Esempio n. 1
0
 protected void btnEditUser_Click(object sender, EventArgs e)
 {
     if (channelId == Guid.Empty)
     {
         //增加;
         Channel channel = new Channel();
         channel.ChannelName = this.txtName.Text;
         channel.Remark      = this.txtRemark.Text;
         if (DistributorGradeBrower.InsertChannelList(channel))
         {
             this.ShowMsg("增加成功!", true);
         }
         else
         {
             this.ShowMsg("增加失败!", false);
         }
     }
     else
     {
         //修改
         Channel ChannelInfo = DistributorGradeBrower.GetChannelListGrade(channelId);
         ChannelInfo.Remark      = this.txtName.Text;
         ChannelInfo.ChannelName = this.txtRemark.Text;
         if (DistributorGradeBrower.UpdateChannelList(ChannelInfo))
         {
             this.ShowMsg("修改成功!", true);
         }
         else
         {
             this.ShowMsg("修改失败!", true);
         }
     }
 }