示例#1
0
文件: Update.cs 项目: jetoneDev/jt-og
 /// <summary>
 /// 修改部门信息(去除token)
 /// </summary>
 /// <param name="data"></param>
 /// <returns></returns>
 public static bool UpdateDepartmentInfo(UpdateDepartmentData data)
 {
     if (data == null)
     {
         throw new ArgumentException("data 参数不能为空");
     }
     using (var c = Sql.CreateConnection())
     {
         return(c.Update(Sql.UpdateDepartmentInfo, new { data.DepartmentName, data.DepartmentId }) == 0 ? false : true);
     }
 }
示例#2
0
文件: Update.cs 项目: jetoneDev/jt-og
 /// <summary>
 /// 修改部门信息
 /// </summary>
 /// <param name="data"></param>
 /// <param name="token"></param>
 /// <returns></returns>
 public static bool UpdateDepartmentInfo(UpdateDepartmentData data, string token)
 {
     if (string.IsNullOrWhiteSpace(token))
     {
         throw new ArgumentException("token不能为空");
     }
     if (data == null)
     {
         throw new ArgumentException("data 参数不能为空");
     }
     using (var c = Sql.CreateConnection())
     {
         return(c.Update(Sql.UpdateDepartmentInfo, new { data.DepartmentName, data.DepartmentId }) == 0 ? false : true);
     }
 }