public ActionResult TeamAbility_Edit(f_team_ability model) { string sql = string.Format("update f_team_ability t set t.name='{0}' where t.id={1}", model.name, model.id); int count = DbHelperMySQL.ExecuteSql(sql); return(Json(Result.AutoResult(count), JsonRequestBehavior.AllowGet)); }
public ActionResult TeamAbility_Add(f_team_ability model) { string sql = string.Format("select count(*) from f_team_ability t where t.del=0 and t.name='{0}'", model.name); int count = Convert.ToInt32(DbHelperMySQL.GetSingle(sql)); if (count != 0) { return(Json(Result.Error("该扶贫服务已存在", -1), JsonRequestBehavior.AllowGet)); } sql = string.Format("insert into f_team_ability(name,del) values('{0}',0)", model.name); count = DbHelperMySQL.ExecuteSql(sql); return(Json(Result.AutoResult(count), JsonRequestBehavior.AllowGet)); }