public object Get(DataSourceRequest request) { var response = new ApiErrorDetail(); try { var designationList = _designationService.GetAllDesignation().ToList(); var kendoList = designationList.ToDataSourceResult(request); return(kendoList); } catch (Exception ex) { return(ErrorHelper.KendoCatchBloackResponse(response, ex)); } }
public ActionResult AddNewEmployee() { AdminProfileViewModel adminProfileViewModel = new AdminProfileViewModel(); var gender = genderService.GetAllGender(); adminProfileViewModel.GenderList = genderService.GetSelectListItemsGender(gender); var qualification = qualificationService.GetAllQualification(); adminProfileViewModel.QualificationList = qualificationService.GetSelectListItemQualification(qualification); var designation = designationService.GetAllDesignation(); adminProfileViewModel.DesignationList = designationService.GetSelectListItemDesignation(designation); var department = departmentService.GetAllDepartment(); adminProfileViewModel.DepartmentList = departmentService.GetSelectListItemsDepartment(department); return(View(adminProfileViewModel)); }
public HttpResponseMessage Get(int companyId) { try { var Designation = _designation.GetAllDesignation(companyId); return(Request.CreateResponse(HttpStatusCode.OK, Designation)); } catch (Exception ex) { throw new ApiDataException(1000, "Designation not found", HttpStatusCode.NotFound); } }
public async Task <IHttpActionResult> Get() { try { var result = await _designationService.GetAllDesignation(); return(this.JsonDataResult(result)); } catch (Exception e) { //Logger.Log(LogLevel.Error, e); return(new InternalServerErrorResult(this)); } }