• 结束回调事件(开头必须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);

    }

  • 相关阅读:
    gitlab的数据库磁盘坏了已经没有办法恢复情况下如何恢复git上的代码
    psql: FATAL: the database system is in recovery mode
    k8s 下 jenkins 分布式部署:利用pipeline动态增加slave节点
    pipeline 流水线:持续部署(docker)-企业微信群通知消息
    查看私有仓库镜像的版本列表
    MyBatis与Hibernate比较
    MyBatis与JDBC的对比
    Java_Ant详解(转载)
    IntelliJ Idea 常用快捷键列表
    隔行换色
  • 原文地址:https://www.cnblogs.com/heyiping/p/9382764.html
Copyright © 2020-2023  润新知