Ejemplo n.º 1
0
        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));
            }
        }
Ejemplo n.º 2
0
        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));
        }
Ejemplo n.º 3
0
        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);
            }
        }
Ejemplo n.º 4
0
        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));
            }
        }