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);
        }
        public ActionResult NewEliminateTask()
        {
            if (Session["CheckEliminateTask"] == null || !(bool)Session["AddEliminateTask"] || !(bool)Session["CheckEliminateTask"])
            {
                Response.Write("<script>history.go(0);</script>");
                return View("Error");
            }

            var listService = new ListService();
            //将猪的类型存入下拉列表
            IEnumerable<SelectListItem> pighouse = listService.GetPigHouseList();
            ViewData["PigHouse"] = pighouse;
            ViewData["Pigsty"] = listService.FindPigstyListByPigHouseId(pighouse.First().Value);
            ViewBag.Title = "新建淘汰任务";

            return View(new EliminateTask());
        }