public HttpResponseMessage AddTestData(TestModel testModel) { try { Log.Info("TestController:AddMenu", "Add TestData START", string.Empty); _testService.AddTestData(testModel); Log.Info("TestController:AddMenu", "Add TestData END", string.Empty); return(this.Request.CreateResponse(HttpStatusCode.OK, new { Messsage = "Data added Successfully!" })); } catch (Exception ex) { var helper = new AppPresentationException(ex); return(helper.GetResponse(this)); } }
public HttpResponseMessage GetCourseTypeById(int Id) { try { Log.Info("QualificationController:GetCourseTypeById", "Get CourseType By Id START", string.Empty); UserContextModel objUser = new UserContextModel(); objUser.UserID = 1; objUser.CompanyCode = "devDB"; var data = _qualificationService.GetCourseTypeByID(Id, objUser); Log.Info("QualificationController:GetCourseTypeById", "Get CourseType By Id END", string.Empty); return(this.Request.CreateResponse(HttpStatusCode.OK, data)); } catch (Exception ex) { var helper = new AppPresentationException(ex); return(helper.GetResponse(this)); } }
public HttpResponseMessage UpdateInstitute(Institute model) { try { Log.Info("QualificationController:UpdateInstitute", "Update Institute START", string.Empty); UserContextModel objUser = new UserContextModel(); objUser.UserID = 1; objUser.CompanyCode = "devDB"; var data = _qualificationService.UpdateInstitute(model, objUser); Log.Info("QualificationController:UpdateInstitute", "Update Institute END", string.Empty); return(this.Request.CreateResponse(HttpStatusCode.OK, data)); } catch (Exception ex) { var helper = new AppPresentationException(ex); return(helper.GetResponse(this)); } }
public HttpResponseMessage GetAllGlobalProfile() { try { //Log.Info("GlobalProfileController:GetAllGlobalProfile", "Get All GlobalProfileModel START", string.Empty); UserContextModel objUser = new UserContextModel(); objUser.UserID = 1; objUser.CompanyCode = "devDB"; var data = _globalProfileService.GetAllGlobalProfile(objUser); //Log.Info("GlobalProfileController:GetAllGlobalProfile", "Get All GlobalProfileModel END", string.Empty); return(this.Request.CreateResponse(HttpStatusCode.OK, data)); } catch (Exception ex) { var helper = new AppPresentationException(ex); return(helper.GetResponse(this)); } }
public HttpResponseMessage UpdateUserDefinedField(List <UserDefinedField> model) { try { // Log.Info("UserDefineController:UpdateUserDefinedField", "Update UserDefinedField START", string.Empty); UserContextModel objUser = new UserContextModel(); objUser.UserID = 1; objUser.CompanyCode = "devDB"; var data = _userDefinedFieldService.UpdateUserDefinedField(model, objUser); //Log.Info("UserDefineController:UpdateUserDefinedField", "Update UserDefinedField END", string.Empty); return(this.Request.CreateResponse(HttpStatusCode.OK, data)); } catch (Exception ex) { var helper = new AppPresentationException(ex); return(helper.GetResponse(this)); } }
public HttpResponseMessage AddUpdateSecuritySettings(SecuritySettings model) { try { Log.Info("SecuritySettingsController:AddUpdateSecuritySettings", "Add Security Settings Start", string.Empty); model.TransType = "SAVE"; UserContextModel objUser = new UserContextModel(); objUser.UserID = 1; objUser.CompanyCode = "devDB"; var data = _securitySettingService.AddUpdateSecuritySettings(model, objUser); Log.Info("SecuritySettingsController:AddUpdateSecuritySettings", "Add Security Settings End", string.Empty); return(this.Request.CreateResponse(HttpStatusCode.OK, data)); } catch (Exception ex) { var helper = new AppPresentationException(ex); return(helper.GetResponse(this)); } }
public HttpResponseMessage GetEntityById(Entity model) { try { Log.Info("EntityController:GetEntityById", "Get Entities By Id Start", string.Empty); model.TransType = "FETCHBYENTITYID"; UserContextModel objUser = new UserContextModel(); objUser.UserID = 1; objUser.CompanyCode = "devDB"; var data = _entityService.GetEntityById(model, objUser); Log.Info("EntityController:GetEntityById", "Get Entities By Id End", string.Empty); return(this.Request.CreateResponse(HttpStatusCode.OK, data)); } catch (Exception ex) { var helper = new AppPresentationException(ex); return(helper.GetResponse(this)); } }
public HttpResponseMessage GetGroupCompany() { try { Log.Info("GroupCompanyController:GetGroupCompany", "Get Group Company Start", string.Empty); GroupCompany model = new GroupCompany(); model.TransType = "FETCH"; UserContextModel objUser = new UserContextModel(); objUser.UserID = 1; objUser.CompanyCode = "devDB"; var data = _groupCompanyService.GetGroupCompany(model, objUser); Log.Info("GroupCompanyController:GetGroupCompany", "Get Group Company END", string.Empty); return(this.Request.CreateResponse(HttpStatusCode.OK, data)); } catch (Exception ex) { var helper = new AppPresentationException(ex); return(helper.GetResponse(this)); } }