public ActionResult EditPreventionDiseaseTask(string taskNumber)
        {
            if (Session["CheckFeed"] == null || !(bool)Session["EditPreventionDisease"] ||
                !(bool)Session["CheckPreventionDisease"])
            {
                Response.Write("<script>history.go(0);</script>");
                return View("Error");
            }

            PreventionDiseaseTask updateTask = new PreventionDiseaseTask().GetPreventionDiseaseTask(taskNumber);

            if (updateTask == null)
            {
                return View("Error");
            }

            var listService = new ListService();

            ViewData["PreventionType"] = listService.GetPreventionTypeList();
            ViewData["pighouse"] = listService.GetPigHouseList();
            ViewData["taskStatus"] = listService.GetTaskStatusList();
            ViewData["PigStyPigType"] = listService.GetPigStyPigTypeList();
            ViewBag.Title = "修改防疫任务";
            return View("NewPreventionDiseaseTask", updateTask);
        }
        public ActionResult EditTransferPigstyTask(string taskNumber)
        {
            if (Session["CheckFeed"] == null || !(bool) Session["EditTransferPigsty"] ||
                !(bool) Session["CheckTransferPigsty"])
            {
                Response.Write("<script>history.go(0);</script>");
                return View("Error");
            }

            var listService = new ListService();

            ViewData["pighouse"] = listService.GetPigHouseList();
            ViewData["pigsty"] = listService.GetFirstPigstyList();
            ViewData["taskStatus"] = listService.GetTaskStatusList();
            ViewBag.Title = "修改转栏任务";
            TransferTask checkTransfertask = new TransferTask().GetTransferTask(taskNumber);
            return checkTransfertask != null ? View("NewTransferPigstyTask", checkTransfertask) : View("Error");
        }
        public ActionResult EditEliminateTask(string taskNumber)
        {
            if (Session["CheckEliminateTask"] == null || !(bool)Session["EditEliminateTask"] || !(bool)Session["CheckEliminateTask"])
            {
                Response.Write("<script>history.go(0);</script>");
                return View("Error");
            }

            EliminateTask updateTask = new EliminateTask().GetEliminateTask(taskNumber);

            if (updateTask == null)
            {
                return View("Error");
            }

            var listService = new ListService();
            IEnumerable<SelectListItem> pighouse = listService.GetPigHouseList();
            ViewData["Status"] = listService.GetTaskStatusList();
            ViewData["PigHouse"] = pighouse;
            ViewData["Pigsty"] = listService.FindPigstyListByPigHouseId(pighouse.First().Value);
            ViewBag.Title = "修改淘汰任务";
            return View("NewEliminateTask", updateTask);
        }
Exemplo n.º 4
0
        public ActionResult EditDeadTask(string taskNumber)
        {
            if (Session["CheckDeadTask"] == null || !(bool)Session["EditDeadTask"] || !(bool)Session["CheckDeadTask"])
            {
                Response.Write("<script>history.go(0);</script>");
                return View("Error");
            }

            deadTask updateTask = new deadTask().GetdeadTask(taskNumber);

            if (updateTask == null)
            {
                return View("Error");
            }

            var listService = new ListService();

            ViewData["Status"] = listService.GetTaskStatusList();
            ViewData["PigHouse"] = listService.GetPigHouseList();
            ViewData["Pigsty"] = listService.GetFirstPigstyList();
            ViewBag.Title = "修改死亡任务";
            return View("NewDeadTask", updateTask);
        }
Exemplo n.º 5
0
        public ActionResult EditSaleTask(string taskNumber)
        {
            if (Session["CheckFeed"] == null || !(bool)Session["EditSale"] || !(bool)Session["CheckSale"])
            {
                Response.Write("<script>history.go(0);</script>");
                return View("Error");
            }

            SaleTask updateTask = new SaleTask().GetSaleTask(taskNumber);

            if (updateTask == null)
            {
                return View("Error");
            }

            var listService = new ListService();

            ViewData["Status"] = listService.GetTaskStatusList();
            ViewData["PigType"] = listService.GetPigTypeList();
            ViewData["Customer"] = listService.GetCustomerList();
            ViewBag.Title = "修改销售任务";
            return View("NewSaleTask", updateTask);
        }
Exemplo n.º 6
0
        public ActionResult EditCureTask(string taskNumber)
        {
            if (Session["CheckFeed"] == null || !(bool)Session["EditCure"] || !(bool)Session["CheckCure"])
            {
                Response.Write("<script>history.go(0);</script>");
                return View("Error");
            }

            object cureTask = new CureTask().GetCureTask(taskNumber);
            if (cureTask == null)
            {
                return View("Error");
            }

            var listService = new ListService();

            ViewData["Pigsty"] = listService.GetFirstPigstyList();
            ViewData["Employee"] = listService.GetEmployeeList();
            ViewData["PigHouse"] = listService.GetPigHouseList();
            ViewData["Medicine"] = listService.GetMedicineList();
            ViewData["CureType"] = listService.GetCureTypeList();
            ViewData["Unit"] = listService.GetUnitList();
            ViewData["Status"] = listService.GetTaskStatusList();
            ViewBag.Title = "修改治疗信息";
            return View("NewCureTask", cureTask);
        }