Ejemplo n.º 1
0
 // GET: M/JBProduceQuality
 public ActionResult Index()
 {
     ViewBag.Title = "卷包质量看板";
     ViewBag.Date  = DateTime.Now.ToString("yyyy年MM月dd日");
     ViewBag.Week  = DataConvert.Change(DateTime.Now.DayOfWeek);
     return(View());
 }
 /// <summary>
 /// 大屏 月
 /// </summary>
 /// <returns></returns>
 public ActionResult LIndex_M()
 {
     ViewBag.Title = "制丝质量";
     ViewBag.Date  = getDate(3);
     ViewBag.Week  = DataConvert.Change(DateTime.Now.DayOfWeek);
     return(View());
 }
Ejemplo n.º 3
0
 /// <summary>
 /// 大屏 天(昨日)
 /// </summary>
 /// <returns></returns>
 public ActionResult LIndex_D()
 {
     ViewBag.Title = "卷包单耗";
     //ViewBag.Date = getDate(1);
     ViewBag.Date = DateTime.Now.Date.AddDays(-1).ToString("yyyy-MM-dd");
     ViewBag.Week = DataConvert.Change(DateTime.Now.DayOfWeek);
     return(View());
 }
Ejemplo n.º 4
0
        public JsonResult ChangeProductDate(string CurrentDate, string DateFlag)
        {
            switch (DateFlag)
            {
            case "Preday":        //前一天
                DateTime predt = Convert.ToDateTime(CurrentDate).AddDays(-1);
                ViewBag.Date = predt.ToString("yyyy年MM月dd日");
                ViewBag.Week = DataConvert.Change(predt.DayOfWeek);
                break;

            case "Today":         //今天
                ViewBag.Date = DateTime.Now.ToString("yyyy年MM月dd日");
                ViewBag.Week = DataConvert.Change(DateTime.Now.DayOfWeek);
                break;

            case "Nexday":        //后一天
                DateTime nextdt = Convert.ToDateTime(CurrentDate).AddDays(1);
                ViewBag.Date = nextdt.ToString("yyyy年MM月dd日");
                ViewBag.Week = DataConvert.Change(nextdt.DayOfWeek);
                break;

            case "Refresh":       //刷新
                DateTime curdt = Convert.ToDateTime(CurrentDate);
                ViewBag.Date = curdt.ToString("yyyy年MM月dd日");
                ViewBag.Week = DataConvert.Change(curdt.DayOfWeek);
                break;

            default:
                break;
            }
            DataTable resultdt = new DataTable("DateTable");

            resultdt.Columns.Add("PRODUCTDATE", typeof(string));
            resultdt.Columns.Add("WEEK", typeof(string));

            resultdt.Rows.Add(ViewBag.Date, ViewBag.Week);
            return(JsonSMES(resultdt));

            //var data = new { PRODUCTDATE = ViewBag.Date ,
            //                 WEEK = ViewBag.Week,
            //};

            //return JsonSMES(data);
        }