예제 #1
0
        public ActionResult Analyze(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            RequestPlanningViewModel requestPlanningViewModel = _repairRequestService.FindById((int)id).MapModelToViewModelRequestPlanning();

            if (requestPlanningViewModel == null)
            {
                return(HttpNotFound());
            }

            var mainSiteList = new SelectList(new[] { "سایت 1 - مرکزی",
                                                      "سایت 2 - اداری 2",
                                                      "سایت 3 - بازارچه",
                                                      "سایت 4 - کمپ 4",
                                                      "سایت 5 - پایانه بار",
                                                      "سایت 6 - اسکله و بندر",
                                                      "سایت 7 - شیرینو",
                                                      "سایت 8 - کمپ EPC", });

            ViewBag.MainSiteList = mainSiteList;
            var requestType = new SelectList(new[] { "تعميرات", "نصب تجهيزات جديد" });

            ViewBag.RequestType = requestType;
            var taskType = new SelectList(new[] { "برق و دیزل", "تاسیسات و مکانیک عمومی", "برودت و تهویه", "ابنیه" });

            ViewBag.TaskType = taskType;



            return(View(requestPlanningViewModel));
        }
        // GET: Request/RepairRequests/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            RequestUserViewModel requestUserViewModel = _repairRequestService.FindById((int)id).MapModelToViewModelRequestUser();

            if (requestUserViewModel == null)
            {
                return(HttpNotFound());
            }
            return(PartialView("_Details", requestUserViewModel));
        }