示例#1
0
        public static List <object> GetChartData()
        {
            JobHistorytab jb        = new JobHistorytab();
            List <object> chartData = new List <object>();
            DataTable     dt        = HttpContext.Current.Session["Mydata"] as DataTable;

            if (dt != null)
            {
                decimal[] dResult = new decimal[2];
                dResult[0] = jb.GetTotalresult(true, dt);
                dResult[1] = jb.GetTotalresult(false, dt);

                chartData.Add(new object[]
                {
                    "Status", "Percentage"
                });
                chartData.Add(new object[] { "SUCCESS", dResult[0] });
                chartData.Add(new object[] { "FAILURE", dResult[1] });
            }
            return(chartData);
        }
        public static List<object> GetChartData()
        {
            JobHistorytab jb = new JobHistorytab();
            List<object> chartData = new List<object>();
            DataTable dt = HttpContext.Current.Session["Mydata"] as DataTable;
            if (dt != null)
            {
                decimal[] dResult = new decimal[2];
                dResult[0] = jb.GetTotalresult(true, dt);
                dResult[1] = jb.GetTotalresult(false, dt);

                chartData.Add(new object[]
            {
                "Status", "Percentage"
            });
                chartData.Add(new object[] { "SUCCESS", dResult[0] });
                chartData.Add(new object[] { "FAILURE", dResult[1] });

            }
            return chartData;
        }