zoukankan      html  css  js  c++  java
  • 结束回调事件(开头必须cp开头,JSProperties传参)

    <dx:ASPxComboBox ID="comBrand" CssClass="case" ClientInstanceName="comBrand" runat="server" ValueType="System.String" ValueField="BrandID" TextField="BrandName" OnCallback="ComBrand_Callback">
    <ClientSideEvents EndCallback="EndCallback_Brand" />
    <ValidationSettings ErrorTextPosition="Bottom" Display="Dynamic">
    <RequiredField ErrorText="品牌不能为空!" IsRequired="true" />
    </ValidationSettings>
    </dx:ASPxComboBox>

    protected void ComBrand_Callback(object sender, DevExpress.Web.CallbackEventArgsBase e)
    {
    string ClientID = e.Parameter;
    List<string> sqlList = new List<string>
    {
    string.Format(SQL_DATABrand_SELECT, QHString.QuotedStr(ClientID)),
    SQL_DATAClient_SELECT + " WHERE ClientID=" + QHString.QuotedStr(ClientID),//客户
    string.Format(SQL_ClientContact_SELECT, QHString.QuotedStr(ClientID))//客户联系人
    };
    DataSet ds = ApiMethod.GetDataSetBySqllist(sqlList);
    comBrand.DataSource = ds.Tables[0];
    comBrand.DataBind();
    //利用品牌结束回调绑定客户联系人信息
    if (ds.Tables[2].Rows.Count > 0)
    {
    comBrand.JSProperties["cpContact"] = "{\"Name\":\"" + QHString.ToString(ds.Tables[2].Rows[0]["Name"]) + "\",\"Phone\":\"" + QHString.ToString(ds.Tables[2].Rows[0]["Phone"]) + "\",\"Mail\":\"" + QHString.ToString(ds.Tables[2].Rows[0]["Mail"]) + "\",\"Location\":\"" + QHString.ToString(ds.Tables[1].Rows[0]["Location"]) + "\"}";
    }
    else
    {
    comBrand.JSProperties["cpContact"] = "{\"Name\":\"\",\"Phone\":\"\",\"Mail\":\"\",\"Location\":\"\"}";
    }
    }

    function EndCallback_Brand(result) {
    var cpContact = eval("(" + comBrand.cpContact + ")");
    txtContact.SetText(cpContact.Name);
    txtPhone.SetText(cpContact.Phone);
    txtMail.SetText(cpContact.Mail);
    txtClientLocation.SetText(cpContact.Location);
    //txtContact.SetText(cpContact.Name);

    }

  • 相关阅读:
    Dat2Rin.exe + runpkr00.exe 将*.T0* 数据转换成Rinex文件
    使用scipy.spatial.Delaunay 三角网的构建
    tinkphp3第三方类库引入问题
    git 撤销更改
    nginx各种配置
    elastic教程
    centos添加动态库默认搜索路径
    JSwebsocket问题:One or more reserved bits are on: reserved1 = 1, reserved2 = 1, reserved3 = 0
    关于脚本手动正常运行,放入crontab无效的问题
    mysql相关操作
  • 原文地址:https://www.cnblogs.com/heyiping/p/9382764.html
Copyright © 2011-2022 走看看