Пример #1
0
 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);
 }
Пример #2
0
        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));
        }
Пример #3
0
        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);
        }
Пример #4
0
        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);
        }
Пример #5
0
        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);
        }
Пример #6
0
 public bool Delete(iPow.Infrastructure.Data.DataSys.Sys_Roles entity, iPow.Infrastructure.Data.DataSys.Sys_AdminUser operUser)
 {
     throw new NotImplementedException();
 }
Пример #7
0
 public void Modify(iPow.Infrastructure.Data.DataSys.Sys_Roles role)
 {
     roleRespoitory.Modify(role);
     roleRespoitory.Uow.Commit();
 }
Пример #8
0
 public void Delete(iPow.Infrastructure.Data.DataSys.Sys_Roles role)
 {
     roleRespoitory.Delete(role);
     roleRespoitory.Uow.Commit();
 }