/// <summary> /// 修改 /// </summary> /// <param name="entity"></param> /// <returns></returns> public int UpdateModuleColumn(Sys_ModuleColumn entity) { using (IDbConnection conn = DapperAdapter.MySQLOpenConnection(ConfigurationHelper.MySQLConnectionStr)) { StringBuilder sb = new StringBuilder(); sb.Append(@"UPDATE sys_modulecolumn SET ModuleId=@ModuleId,ParentId=@ParentId,EnCode=@EnCode,FullName=@FullName,SortCode=@SortCode,Description=@Description WHERE ModuleColumnId=@ModuleColumnId;"); var num = conn.Execute(sb.ToString(), entity); return(num); } }
/// <summary> /// 新增 /// </summary> /// <param name="entity"></param> /// <returns></returns> public int AddModuleColumn(Sys_ModuleColumn entity) { using (IDbConnection conn = DapperAdapter.MySQLOpenConnection(ConfigurationHelper.MySQLConnectionStr)) { StringBuilder sb = new StringBuilder(); sb.Append(@"INSERT INTO sys_modulecolumn (ModuleColumnId,ModuleId,ParentId,EnCode,FullName,SortCode,Description) VALUES (@ModuleColumnId,@ModuleId,@ParentId,@EnCode,@FullName,@SortCode,@Description);"); var num = conn.Execute(sb.ToString(), entity); return(num); } }