public IActionResult HistoryData() { string[] UserIDList = PMUser.UserMessage.Select(x => x.EmpID).ToArray(); bool UserID = UserIDList.Contains <string>(HttpContext.Request.Cookies["EmpID"]); //if (PMUser.EmpID ==string.Empty) //{ // return RedirectToAction("Index", "Index"); //} if (!UserID) { return(RedirectToAction("Index", "Index")); } else if (HttpContext.Request.Cookies["UserGuid"] != PMUser.GetuserGuid(HttpContext.Request.Cookies["EmpID"])) { return(RedirectToAction("Index", "Index")); } else { MDatacenter data = new MDatacenter(); data.Datacenterorderdelay(); Workplaninfo.GetWorkPlanInfo(string.Empty); return(View()); } }
public IActionResult Index() { string[] UserIDList = PMUser.UserMessage.Select(x => x.EmpID).ToArray(); bool UserID = UserIDList.Contains <string>(HttpContext.Request.Cookies["EmpID"]); //if (PMUser.EmpID ==string.Empty) //{ // return RedirectToAction("Index", "Index"); //} if (!UserID) { return(RedirectToAction("Index", "Index")); } else if (HttpContext.Request.Cookies["UserGuid"] != PMUser.GetuserGuid(HttpContext.Request.Cookies["EmpID"])) { return(RedirectToAction("Index", "Index")); } else { //获取计划信息 Workplaninfo.GetWorkPlanInfo(string.Empty); ViewBag.Owner = Workplaninfo.Owner; ViewBag.WorkPlanId = Workplaninfo.WorkPlanId; ViewBag.WorkPlanName = Workplaninfo.WorkPlanName; ViewBag.ReleaseTime = Workplaninfo.ReleaseTime; //获取order统计信息 MDatacenter data = new MDatacenter(); data.Datacenterorderdelay(); ViewBag.ErrorPercentage = data.ErrorPercentage; ViewBag.LatePercentage = data.LatePercentage; ViewBag.OnTimePercentage = data.OnTimePercentage; ViewBag.EarlyPercentage = data.EarlyPercentage; OrderForm order = new OrderForm(); order.Pieorder(); return(View(data)); } }