Beispiel #1
0
        public ActionResult Edit(int?id, string filterType, string filterValue, int?page)
        {
            if (id.HasValue == false)
            {
                DisplayWarningMessage("Request ID is missing in your request");
                return(RedirectToAction("List", new { filterType, filterValue, page }));
            }
            RecruitmentRequestModel requestModel = new RecruitmentRequestModel();

            try
            {
                LoadDropDownItems();
                if (reqService.Exists(id.Value) == false)
                {
                    DisplayWarningMessage("We couldn't find the request details. Please check with the Admin team.");
                }
                RecruitmentRequestDto reqestDto = reqService.GetByID(id.Value);
                requestModel = Mapper.Map <RecruitmentRequestDto, RecruitmentRequestModel>(reqestDto);
            }
            catch (Exception exp)
            {
                DisplayLoadErrorMessage(exp);
            }

            return(View(requestModel));
        }