示例#1
0
        public RolesAccessDTO InserRoleAccess(RolesAccessDTO data)
        {
            RolesAccess rolesToInsert = new RolesAccess();

            rolesToInsert = RolesAccessRequestFormatter.ConvertRespondentInfoFromDTO(data);
            var responseData = _unitOfWork.RolesAccessRepository.Create(rolesToInsert);

            return(RolesAccessRequestFormatter.ConvertRespondent(responseData));
        }
示例#2
0
        public RolesAccessDTO GetRoleByRoleIdModuleId(string roleid, string moduleid, string assignid)
        {
            int         roleId   = Convert.ToInt16(roleid);
            int         moduleId = Convert.ToInt16(moduleid);
            int         assignId = Convert.ToInt16(assignid);
            RolesAccess values   = _unitOfWork.RolesAccessRepository.All().Where(x => x.AssignRoleId == roleId && x.AssignModuleId == moduleId && x.AssignId == assignId).First();

            return(RolesAccessRequestFormatter.ConvertRespondentInfoToDTO(values));
        }
示例#3
0
        public int UpdateRolesAccess(RolesAccessDTO data)
        {
            RolesAccess rolesToUpdate = new RolesAccess();

            rolesToUpdate = RolesAccessRequestFormatter.ConvertRespondentInfoFromDTO(data);
            int res = _unitOfWork.RolesAccessRepository.Update(rolesToUpdate);

            _unitOfWork.Save();
            return(res);
        }