예제 #1
0
        public Response <SurveyorDetailVM> SaveSurveyDetail(SurveyorDetailVM surveyor)
        {
            Response <SurveyorDetailVM> response    = new Response <SurveyorDetailVM>();
            SurveyorDetailVM            surveyorObj = null;

            try
            {
                surveyorObj = PLRDAO.SaveSurveyDetail(surveyor);

                if (surveyorObj != null)
                {
                    response.Status  = ResultStatus.Success;
                    response.Message = "Survey Detail has been Saved";
                    response.Data    = surveyorObj;
                }
            }
            catch (Exception ex)
            {
                LoggerService.LogException(ex);

                response.Status  = ResultStatus.Error;
                response.Message = "Error";
                response.Data    = surveyorObj;
            }

            return(response);
        }
        public ActionResult Details(int ClaimId)
        {
            try
            {
                if (string.IsNullOrEmpty(UserId.ToString()))
                {
                    return RedirectToAction("Login", "Auth");
                }

                TempData["msg"] = "<script>alert('Submitted bill details will not show');</script>";

                SurveyorDetailVM ddl = _plrService.BindDropDown(ClaimId);
                var res = _ClaimHandlerService.GetFinalReportDetails(ClaimId, Convert.ToInt32(SessionManager.UserId));
                CheckAccess();

                ViewBag.TypeOfClaimddl = ddl.TypeOfClaimddl;
                ViewBag.Cityddl = ddl.Cityddl;
                ViewBag.Areaddl = ddl.Areaddl;
                ViewBag.Workshopddl = ddl.Workshopddl;
                ViewBag.ClaimTypeId = res.SurveyorDetailVM.ClaimTypeId;

                return View("Details", res);

            }
            catch (Exception ex)
            {
                LoggerService.LogException(ex);
                return Redirect("~/DashBoard/Index");
            }
        }
예제 #3
0
        public ActionResult SaveSurveyDetail(SurveyorDetailVM surveyor)
        {
            if (!ModelState.IsValid)
            {
                return(Json(new Result {
                    Status = ResultStatus.Error, Message = ValidationMessages.ErrorMessage, Data = null
                }, JsonRequestBehavior.AllowGet));
            }

            Response <SurveyorDetailVM> response = _plrService.SaveSurveyDetail(surveyor);

            return(Json(new Result {
                Status = response.Status, Message = response.Message, Data = response.Data
            }, JsonRequestBehavior.AllowGet));
        }
예제 #4
0
        public ActionResult Details(int ClaimId)
        {
            try
            {
                TempData["msg"] = "<script>alert('Submitted PLR details will not show');</script>";

                if (string.IsNullOrEmpty(UserId.ToString()))
                {
                    return(RedirectToAction("Login", "Auth"));
                }
                SurveyorDetailVM ddl    = _plrService.BindDropDown(ClaimId);
                Detail           Detail = _plrService.GetDetails(ClaimId, UserId, Request.UserHostAddress, Request["SalesFormMappingId"]);

                if (Detail.PLRAssessmentDetail.VendorList != null)
                {
                    Detail.PLRAssessmentDetail.VendorList = Detail.PLRAssessmentDetail.VendorList.GroupBy(a => a.Name).Select(g => g.First()).ToList();
                    ViewBag.VendorList = Detail.PLRAssessmentDetail.VendorList;
                    //List<WorkshopsTaxView> lstTax = _plrService.GetVendorTaxProfile(!string.IsNullOrEmpty(Detail.PLRAssessmentDetail.VendorList[0].ContactId.ToString()) ? Convert.ToInt32(Detail.PLRAssessmentDetail.VendorList[0].ContactId) : 0);
                    //ViewBag.TaxProfile = lstTax;
                }

                CheckAccess();
                ViewBag.TypeOfClaimddl = ddl.TypeOfClaimddl;
                ViewBag.Cityddl        = ddl.Cityddl;
                ViewBag.Areaddl        = ddl.Areaddl;
                ViewBag.Workshopddl    = ddl.Workshopddl;
                ViewBag.ClaimTypeId    = Detail.SurveyorDetailVM.ClaimTypeId;


                return(View("Details", Detail));
            }
            catch (Exception ex)
            {
                LoggerService.LogException(ex);
                return(Redirect("~/DashBoard/Index"));
            }
        }