public async Task <ActionResult> AddRole(RoleViewModel model) { RoleDAL dal = new RoleDAL(); await dal.Add(model.CastDB(model)); return(ToJsonResult("Success")); }
/// <summary> /// 新增 /// </summary> /// <param name="roleVM"></param> public static void Create(RoleVM roleVM) { Mapper.CreateMap <RoleVM, Role>(); Role role = Mapper.Map <RoleVM, Role>(roleVM); role.CreateTime = DateTime.Now; role.IsDeleted = false; RoleDAL.Add(role); }
/// <summary> /// /// </summary> /// <param name="info"></param> /// <returns></returns> public long InsertInfo(RoleInfo info) { ///角色名①不能重复,必填项 int cnt = dal.GetCounts("[ROLE_NAME] = N'" + info.RoleName + "'"); if (cnt > 0) { throw new Exception("MC:0x00000267");///角色名称重复 } ///TODO:角色类型②为20.超级系统管理的权限默认为全选 return(dal.Add(info)); }
static public int Add(string role_name) { return(RoleDAL.Add(role_name)); }
static public bool Add(Role role, out string msg) { return(RoleDAL.Add(role, out msg)); }
/// <summary> /// 增加一条数据 /// </summary> public int Add(RoleEntity model) { return(dal.Add(model)); }
public void Add(RoleDTO DTO) { RDAL.Add(DTO); }
/// <summary> /// 增加一条数据 /// </summary> public bool Add(Role model) { return(roledal.Add(model) > 0); }
public static bool AddRole(Role role) { return(RoleDAL.Add(role)); }
public int Add(Role model) { return(dal.Add(model)); }
/// <summary> /// 增加一条数据 /// </summary> public int Add(BWJS.Model.Role model) { return(dal.Add(model)); }
/// <summary> /// 增加一条数据 /// </summary> public int Add(HXD.MS.Entity.Role model) { return(dal.Add(model)); }