public JsonResult DMRWIPData()
        {
            var prodline      = Request.Form["prodline"];
            var dmrdata       = DMRSNVM.RetrieveDMRSNData(prodline, null, null, this);
            var moduledist    = ModuleDistribution(dmrdata);
            var dmrstatuslist = DMRStatusSum(dmrdata);
            var yielddata     = DMRModuleYield(prodline, dmrdata);

            var ret = new JsonResult();

            ret.MaxJsonLength = Int32.MaxValue;
            ret.Data          = new
            {
                moduledist    = moduledist,
                dmrstatuslist = dmrstatuslist,
                dmrdata       = dmrdata,
                yielddata     = yielddata
            };
            return(ret);
        }
        public JsonResult DMRTRACEData()
        {
            var prodline = Request.Form["prodline"];

            var startdate = DateTime.Now;
            var enddate   = DateTime.Now;
            var sdate     = DateTime.Parse(Request.Form["sdate"]);
            var edate     = DateTime.Parse(Request.Form["edate"]);

            if (sdate < edate)
            {
                startdate = DateTime.Parse(sdate.ToString("yyyy-MM-dd") + " 00:00:00");
                enddate   = DateTime.Parse(edate.ToString("yyyy-MM-dd") + " 00:00:00").AddDays(1).AddSeconds(-1);
            }
            else
            {
                startdate = DateTime.Parse(edate.ToString("yyyy-MM-dd") + " 00:00:00");
                enddate   = DateTime.Parse(sdate.ToString("yyyy-MM-dd") + " 00:00:00").AddDays(1).AddSeconds(-1);
            }
            var dmrdata = DMRSNVM.RetrieveDMRSNData(prodline, startdate.ToString("yyyy-MM-dd HH:mm:ss")
                                                    , enddate.ToString("yyyy-MM-dd HH:mm:ss"), this);
            var moduledist    = ModuleDistribution(dmrdata);
            var dmrstatuslist = DMRStatusSum(dmrdata);
            var yielddata     = DMRModuleYield(prodline, dmrdata);

            var ret = new JsonResult();

            ret.MaxJsonLength = Int32.MaxValue;
            ret.Data          = new
            {
                moduledist    = moduledist,
                dmrstatuslist = dmrstatuslist,
                dmrdata       = dmrdata,
                yielddata     = yielddata
            };
            return(ret);
        }