Exemplo n.º 1
0
 private void btnEditDistributorSettings_Click(object sender, System.EventArgs e)
 {
     if (this.txtRemark.Text.Trim().Length > 300)
     {
         this.ShowMsg("合作备忘录的长度限制在300个字符以内", false);
         this.chkListProductLine.DataBind();
         this.LoadControl();
         return;
     }
     if (this.chkListProductLine.SelectedValue.Count == 0)
     {
         this.ShowMsg("请选择至少一个授权产品线", false);
         this.chkListProductLine.DataBind();
         this.LoadControl();
         return;
     }
     if (DistributorHelper.UpdateDistributorSettings(this.userId, this.drpDistributorGrade.SelectedValue.Value, this.txtRemark.Text.Trim()))
     {
         if (DistributorHelper.AddDistributorProductLines(this.userId, this.chkListProductLine.SelectedValue))
         {
             ProductHelper.DeleteNotinProductLines(this.userId);
             this.ShowMsg("成功的修改了分销商基本设置", true);
             return;
         }
     }
     else
     {
         this.ShowMsg("修改失败", false);
     }
 }
 private void btnEditDistributorSettings_Click(object sender, EventArgs e)
 {
     if (txtRemark.Text.Trim().Length > 300)
     {
         ShowMsg("合作备忘录的长度限制在300个字符以内", false);
         chkListProductLine.DataBind();
         LoadControl();
     }
     else if (DistributorHelper.UpdateDistributorSettings(userId, drpDistributorGrade.SelectedValue.Value, txtRemark.Text.Trim()))
     {
         if (DistributorHelper.AddDistributorProductLines(userId, chkListProductLine.SelectedValue))
         {
             ProductHelper.DeleteNotinProductLines(userId);
             ShowMsg("成功的修改了分销商基本设置", true);
         }
     }
     else
     {
         ShowMsg("修改失败", false);
     }
 }