示例#1
0
        public ActionResult getData()
        {
            int countPink  = 0;
            int countPurp  = 0;
            int CountOk    = 0;
            int CountNotOk = 0;
            List <ManagementCheckList> managementCheckLists = new List <ManagementCheckList>();
            CheckList checkList = new CheckList("Select");

            managementCheckLists = checkList.GetManagementCheckLists();

            foreach (var c in managementCheckLists)
            {
                if (c.Silcone_Crystal_Color == "Pink")
                {
                    countPink += 1;
                }
                else
                {
                    countPurp += 1;
                }


                if (c.Ozone == "OK")
                {
                    CountOk += 1;
                }
                else
                {
                    CountNotOk += 1;
                }
            }

            ratio obj = new ratio();

            obj.pink        = countPink;
            obj.purple      = countPurp;
            obj.TotalOKs    = CountOk;
            obj.TotalNotOks = CountNotOk;

            return(Json(obj, JsonRequestBehavior.AllowGet));
        }
示例#2
0
        public ActionResult TanklevesData()
        {
            List <ManagementCheckList> managementCheckLists = new List <ManagementCheckList>();
            CheckList checkList = new CheckList("Select");

            managementCheckLists = checkList.GetManagementCheckLists();
            List <ratio> MunTankLevel = new List <ratio>();


            foreach (var t in managementCheckLists)
            {
                ratio objMun   = new ratio();
                ratio objClean = new ratio();

                objMun.CleanTanPercentage = t.Clean_tank_level;
                objMun.munTankPercentage  = t.Mun_Tank_level;
                objMun.TotalLevel         = Convert.ToInt32(t.Clean_tank_level + t.Mun_Tank_level);
                objMun.RatioDate          = t.date;
                MunTankLevel.Add(objMun);
            }


            return(Json(MunTankLevel, JsonRequestBehavior.AllowGet));
        }