예제 #1
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public string Update(Maticsoft.Model.request_form model)
 {
     if (Exists_where(" where form_name='" + model.form_name.Trim() + "' and sid!=" + model.sid))
     {
         return("表单已存在");
     }
     else
     {
         if (dal.Update(model))
         {
             return("success");
         }
         else
         {
             return("保存失败!");
         }
     }
 }
예제 #2
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public string Add(Maticsoft.Model.request_form model)
 {
     if (Exists_where(" where form_name='" + model.form_name.Trim() + "'"))
     {
         return("表单已存在");
     }
     else
     {
         if (dal.Add(model) > 0)
         {
             return("success");
         }
         else
         {
             return("新增失败!");
         }
     }
 }