public JsonResult Add(Domain.Dto.Sys_RolesDto role) { if (!string.IsNullOrEmpty(role.Description)) { var model = new iPow.Infrastructure.Data.DataSys.Sys_Roles(); model.Description = role.Description; model.RoleID = roleService.GetNewRoleId(); roleService.Add(model,null); } var data = this.GetStateTrueList(); var dto = data.ToDto(); return Json(dto, JsonRequestBehavior.AllowGet); }
public JsonResult Add(Domain.Dto.Sys_RolesDto role) { if (!string.IsNullOrEmpty(role.Description)) { var model = new iPow.Infrastructure.Data.DataSys.Sys_Roles(); model.Description = role.Description; model.RoleID = roleService.GetNewRoleId(); roleService.Add(model, null); } var data = this.GetStateTrueList(); var dto = data.ToDto(); return(Json(dto, JsonRequestBehavior.AllowGet)); }
public bool Modify(iPow.Infrastructure.Data.DataSys.Sys_Roles entity, iPow.Infrastructure.Data.DataSys.Sys_AdminUser operUser) { var res = false; if (entity != null && entity.Id > 0) { try { roleRespoitory.Modify(entity); res = true; } catch (Exception ex) { } } return(res); }
public bool DeleteTrue(iPow.Infrastructure.Data.DataSys.Sys_Roles entity, iPow.Infrastructure.Data.DataSys.Sys_AdminUser operUser) { var res = false; if (entity != null) { try { roleRespoitory.Delete(entity); roleRespoitory.Uow.Commit(); res = true; } catch (Exception ex) { } } return(res); }
public bool Add(iPow.Infrastructure.Data.DataSys.Sys_Roles enitty, iPow.Infrastructure.Data.DataSys.Sys_AdminUser operUser) { var res = false; if (enitty != null) { try { rolesRepository.Add(enitty); rolesRepository.Uow.Commit(); res = true; } catch (Exception ex) { } } return(res); }
public bool Delete(iPow.Infrastructure.Data.DataSys.Sys_Roles entity, iPow.Infrastructure.Data.DataSys.Sys_AdminUser operUser) { throw new NotImplementedException(); }
public void Modify(iPow.Infrastructure.Data.DataSys.Sys_Roles role) { roleRespoitory.Modify(role); roleRespoitory.Uow.Commit(); }
public void Delete(iPow.Infrastructure.Data.DataSys.Sys_Roles role) { roleRespoitory.Delete(role); roleRespoitory.Uow.Commit(); }