Beispiel #1
0
 public Maticsoft.Model.Members.FeedbackType DataRowToModel(DataRow row)
 {
     Maticsoft.Model.Members.FeedbackType type = new Maticsoft.Model.Members.FeedbackType();
     if (row != null)
     {
         if ((row["TypeId"] != null) && (row["TypeId"].ToString() != ""))
         {
             type.TypeId = int.Parse(row["TypeId"].ToString());
         }
         if (row["TypeName"] != null)
         {
             type.TypeName = row["TypeName"].ToString();
         }
         if (row["Description"] != null)
         {
             type.Description = row["Description"].ToString();
         }
     }
     return type;
 }
Beispiel #2
0
 protected void btnSave_Click(object sender, EventArgs e)
 {
     string str = this.txtName.Text.Trim();
     if (str.Length == 0)
     {
         MessageBox.ShowServerBusyTip(this, "标签的名称不能为空");
     }
     else
     {
         Maticsoft.Model.Members.FeedbackType model = new Maticsoft.Model.Members.FeedbackType {
             TypeName = str,
             Description = this.txtDesc.Text
         };
         if (this.typeBll.Add(model) > 0)
         {
             LogHelp.AddUserLog(base.CurrentUser.UserName, base.CurrentUser.UserType, "添加反馈类型成功", this);
             MessageBox.ShowSuccessTip(this, Site.TooltipSaveOK, "TypeList.aspx");
         }
         else
         {
             MessageBox.ShowFailTip(this, Site.TooltipSaveError);
         }
     }
 }