Exemple #1
0
 public ActionResult GetKPIJson(Int64 Id)
 {
     try
     {
         List <PM_KPI> result = KPI_BL.KPIList("Get_KPI", Id);
         return(Json(new { Status = true, error = "none", data = result }, JsonRequestBehavior.AllowGet));
     }
     catch (Exception ex)
     {
         return(Json(new { Status = false, error = ex }, JsonRequestBehavior.DenyGet));
     }
 }
Exemple #2
0
        public ActionResult GetKPI(Int64 Id = 0, string Type = "")
        {
            try
            {
                AirView.DBLayer.Project.BLL.PM_KPI_BL KPI_BL = new AirView.DBLayer.Project.BLL.PM_KPI_BL();
                List <AD_Defination> Technology  = new List <AD_Defination>();
                List <AD_Defination> Level       = new List <AD_Defination>();
                List <AD_Defination> DataType    = new List <AD_Defination>();
                List <AD_Defination> Kpi_Type    = new List <AD_Defination>();
                List <AD_Defination> Band        = new List <AD_Defination>();
                List <AD_Defination> Definations = KPI_BL.DefinationList("ByDefinationTypeId");
                for (int i = 0; i < Definations.Count; i++)
                {
                    if (Definations[i].DefinationTypeId == 8)
                    {
                        Technology.Add(Definations[i]);
                    }

                    else if (Definations[i].DefinationTypeId == 120064)
                    {
                        DataType.Add(Definations[i]);
                    }
                    else if (Definations[i].DefinationTypeId == 90064)
                    {
                        Level.Add(Definations[i]);
                    }
                    else if (Definations[i].DefinationTypeId == 90065)
                    {
                        Kpi_Type.Add(Definations[i]);
                    }
                    else if (Definations[i].DefinationTypeId == 10)
                    {
                        Band.Add(Definations[i]);
                    }
                }
                ViewBag.Band         = Band;
                ViewBag.Technologies = Technology;
                ViewBag.Level        = Level;
                ViewBag.DataType     = DataType;
                ViewBag.KpiType      = Kpi_Type;
                List <PM_KPI> result = KPI_BL.KPIList("Get_KPI", Id);
                foreach (var item in result)
                {
                    item.Bands = Definations.Where(x => x.PDefinationId == item.Technology).ToList();
                }
                return(PartialView("~/Areas/Project/Views/Defination/_KPI.cshtml", result));
            }
            catch (Exception ex)
            {
                return(PartialView("<b>" + ex + "</b>"));
            }
        }