public List <CourseType> GetAllCourseType(UserContextModel objUser) { try { var data = _qualificationRepository.GetAllCourseType(objUser.CompanyCode); return(data); } catch (Exception ex) { var helper = new BusinessException(ex); throw helper.GetException(); } }
public CourseType GetCourseTypeByID(int ID, UserContextModel objUser) { try { var data = _qualificationRepository.GetCourseTypeById(ID, objUser.CompanyCode); return(data); } catch (Exception ex) { var helper = new BusinessException(ex); throw helper.GetException(); } }
public List <SecuritySettings> GetSecuritySettings(SecuritySettings model, UserContextModel objUser) { try { var data = _securitysettingsRepository.GetSecuritySettings(model, objUser.CompanyCode); return(data); } catch (Exception ex) { var helper = new BusinessException(ex); throw helper.GetException(); } }
public PaginationData <CourseTitle> GetAllCourseTitle(UserContextModel objUser, PaginationModel paginationModel) { try { var data = _qualificationRepository.GetAllCourseTitle(objUser.CompanyCode); return(data); } catch (Exception ex) { var helper = new BusinessException(ex); throw helper.GetException(); } }
public List <UserDefinedField> GetAllUserDefinedField(UserContextModel objUser) { try { var data = _userDefinedFieldRepository.GetAllUserDefinedField(objUser.CompanyCode); return(data); } catch (Exception ex) { var helper = new BusinessException(ex); throw helper.GetException(); } }
public UserDefinedField GetUserDefinedFieldById(int ID, UserContextModel objUser) { try { var data = _userDefinedFieldRepository.GetUserDefinedFieldById(ID, objUser.CompanyCode); return(data); } catch (Exception ex) { var helper = new BusinessException(ex); throw helper.GetException(); } }
public GlobalProfileModel GetGlobalProfileById(int ID, UserContextModel objUser) { try { var data = _globalProfileRepository.GetGlobalProfileById(ID, objUser.CompanyCode); return(data); } catch (Exception ex) { var helper = new BusinessException(ex); throw helper.GetException(); } }
public List <GlobalProfileModel> GetAllGlobalProfile(UserContextModel objUser) { try { var data = _globalProfileRepository.GetAllGlobalProfile(objUser.CompanyCode); return(data); } catch (Exception ex) { var helper = new BusinessException(ex); throw helper.GetException(); } }
public List <Entity> GetEntityById(Entity model, UserContextModel objUser) { try { var data = _entityRepository.GetEntityById(model, objUser.CompanyCode); return(data); } catch (Exception ex) { var helper = new BusinessException(ex); throw helper.GetException(); } }
public List <GroupCompany> GetGroupCompany(GroupCompany model, UserContextModel objUser) { try { var data = _groupCompanyRepository.GetGroupCompany(model, objUser.CompanyCode); return(data); } catch (Exception ex) { var helper = new BusinessException(ex); throw helper.GetException(); } }
public void AddTestData(TestModel model) { //var valResponse = Validator.GetValidationResponseInstance(); try { var validationResponse = _modelValidation.Validate(TestModelValidation.ValidateAll_key, model, "billing model can not be empty."); if (validationResponse.Messages != null) { throw new ValidationException(validationResponse); } _testRepository.AddTestData(model); } catch (Exception ex) { var helper = new BusinessException(ex); throw helper.GetException(); } }
public ApplicationResponse UpdateCourseType(CourseType model, UserContextModel objUser) { try { var validationResponse = _modelValidation.Validate(CourseTypeValidation.ValidateAll_key, model, "Course type model can not be empty."); if (validationResponse.Messages != null && validationResponse.Messages.Count != 0) { throw new ValidationException(validationResponse); } model.CreatedBy = objUser.UserID; var data = _qualificationRepository.UpdateCourseType(model, objUser.CompanyCode); return(data); } catch (Exception ex) { var helper = new BusinessException(ex); throw helper.GetException(); } }
public ApplicationResponse AddUpdateSecuritySettings(SecuritySettings model, UserContextModel objUser) { try { var validationResponse = _modelValidation.Validate(SecuritySettingValidation.ValidateAll_key, model, "Security settings model can not be empty."); if (validationResponse.Messages != null && validationResponse.Messages.Count != 0) { throw new ValidationException(validationResponse); } model.CreatedBy = objUser.UserID; var data = _securitysettingsRepository.AddUpdateSecuritySettings(model, objUser.CompanyCode); return(data); } catch (Exception ex) { var helper = new BusinessException(ex); throw helper.GetException(); } }
public ApplicationResponse UpdateUserDefinedField(List <UserDefinedField> model, UserContextModel objUser) { try { var validationRespons = _modelValidation.Validate(UserDefineValidation.ValidateAll_key, model, "Section Name can not be blank."); foreach (ValidationResponse obj in validationRespons) { if (obj.Messages != null && obj.Messages.Count != 0) { throw new ValidationException(obj); } } model.ForEach(x => x.CreatedBy = objUser.UserID); var data = _userDefinedFieldRepository.UpdateUserDefinedField(model, objUser.CompanyCode); return(data); } catch (Exception ex) { var helper = new BusinessException(ex); throw helper.GetException(); } }