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); }
public ActionResult NewSaleTask() { if (Session["CheckFeed"] == null || !(bool)Session["AddSale"] || !(bool)Session["CheckSale"]) { Response.Write("<script>history.go(0);</script>"); return View("Error"); } var listService = new ListService(); //将猪的类型存入下拉列表 ViewData["PigType"] = listService.GetPigTypeList(); ViewData["Customer"] = listService.GetCustomerList(); ViewBag.Title = "新建销售任务"; return View(new SaleTask()); }