コード例 #1
0
        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());
            }
        }
コード例 #2
0
        /// <summary>
        /// 订单列表的导出功能
        /// </summary>
        /// <returns>路径让浏览器下载</returns>
        public ActionResult ExportDataCenter()
        {
            MDatacenter mDatacenter = new MDatacenter();
            DataTable   table       = mDatacenter.WorkOrderData();
            string      path        = ExportExcel.Excel(table, "订单列表_" + PMUser.UserGuid + ".xlsx", "订单数据");

            Task.Run(() =>
            {
                Thread.Sleep(30000);
                ExportExcel.DelExcel("订单列表_" + PMUser.UserGuid);
            });
            return(Ok(path));
        }
コード例 #3
0
        public ActionResult DTworkOrder()
        {
            MDatacenter mDatacenter = new MDatacenter();
            DataTable   dt          = mDatacenter.WorkOrderData();
            JObject     tableData   = new JObject {
                { "total", dt.Rows.Count },
                { "rows", JsonConvert.SerializeObject(dt) }
            };
            JObject data = new JObject {
                { "code", "0" },
                { "data", tableData },
                { "msg", "successful" }
            };

            return(Ok(data));
        }
コード例 #4
0
        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));
            }
        }
コード例 #5
0
        public ActionResult <List <GantaData> > GetToDayGantt()
        {
            MDatacenter mDatacenter = new MDatacenter();

            return(mDatacenter.GetTodayGantattData());
        }
コード例 #6
0
 public string GetNavTable(string value)
 {
     //此方法是获取表格中的数据
     return(MDatacenter.GetPmViewGroupTable(value));
 }
コード例 #7
0
 public string NavName()
 {
     //此方法是加载左边导航条的标签
     return(MDatacenter.StrNavName());
 }