private void btnAddDistrbutor_Click(object sender, EventArgs e)
 {
     if (chklProductLine.SelectedValue.Count == 0)
     {
         ShowMsg("至少选择一个产品线", false);
     }
     else
     {
         Distributor distributor = DistributorHelper.GetDistributor(userId);
         distributor.GradeId    = dropDistributorGrade.SelectedValue.Value;
         distributor.Remark     = txtRemark.Text;
         distributor.IsApproved = true;
         if (ValidationDistributor(distributor) && DistributorHelper.AcceptDistributorRequest(distributor, chklProductLine.SelectedValue))
         {
             Messenger.AcceptRequest(distributor);
             ShowMsg("成功接受了该分销商", true);
         }
     }
 }
 private void btnAddDistrbutor_Click(object sender, EventArgs e)
 {
     if (this.chklProductLine.SelectedValue.Count == 0)
     {
         this.ShowMsg("至少选择一个产品线", false);
     }
     else
     {
         Distributor distributor = DistributorHelper.GetDistributor(this.userId);
         distributor.GradeId    = this.dropDistributorGrade.SelectedValue.Value;
         distributor.Remark     = this.txtRemark.Text;
         distributor.IsApproved = true;
         if (this.ValidationDistributor(distributor) && DistributorHelper.AcceptDistributorRequest(distributor, this.chklProductLine.SelectedValue))
         {
             Messenger.AcceptRequest(distributor);
             this.CloseWindow();
         }
     }
 }