Exemplo n.º 1
0
        public ActionResult Index(string obj)
        {
            BreadCrumb.Add(Url.Action("Index", "Home"), "Home");
            BreadCrumb.Add("/KPI/Index", "KPI");
            BreadCrumb.SetLabel("Compare");
            var compare = new DataChartDAO().Compare(obj);

            if (compare.list1 == null)
            {
                compare.list1 = new Model.ViewModel.ChartVM();
            }
            if (compare.list2 == null)
            {
                compare.list2 = new Model.ViewModel.ChartVM();
            }
            if (compare.list3 == null)
            {
                compare.list3 = new Model.ViewModel.ChartVM();
            }
            if (compare.list4 == null)
            {
                compare.list4 = new Model.ViewModel.ChartVM();
            }
            ViewBag.List1 = compare.list1;
            ViewBag.List2 = compare.list2;
            ViewBag.List3 = compare.list3;
            ViewBag.List4 = compare.list4;
            return(View());
        }
Exemplo n.º 2
0
        public ActionResult Index(string kpilevelcode, string period, int?year, int?start, int?end)
        {
            BreadCrumb.Add(Url.Action("Index", "Home"), "Home");
            BreadCrumb.Add("/KPI/Index", "KPI");
            if (period == "W")
            {
                BreadCrumb.SetLabel("Chart / Weekly");
            }
            else if (period == "M")
            {
                BreadCrumb.SetLabel("Chart / Monthly");
            }
            else if (period == "Q")
            {
                BreadCrumb.SetLabel("Chart / Quarterly");
            }
            else if (period == "Y")
            {
                BreadCrumb.SetLabel("Chart / Yearly");
            }


            var model = new DataChartDAO().ListDatas(kpilevelcode, period, year, start, end);

            ViewBag.Datasets  = model.datasets;
            ViewBag.Labels    = model.labels;
            ViewBag.Targets   = model.targets;
            ViewBag.Standards = model.standards;
            ViewBag.Label     = model.label;
            ViewBag.KPIName   = model.kpiname;
            ViewBag.Period    = model.period;

            ViewBag.KPILevelCode   = model.kpilevelcode;
            ViewBag.StatusFavorite = model.statusfavorite == true ? "true" : "false";
            ViewBag.Standard       = model.Standard;
            ViewBag.Unit           = model.Unit;
            ViewBag.Dataremarks    = model.Dataremarks;

            if (model.period == "W")
            {
                ViewBag.PeriodText = "Weekly";
            }
            ;
            if (model.period == "M")
            {
                ViewBag.PeriodText = "Monthly";
            }
            ;
            if (model.period == "Q")
            {
                ViewBag.PeriodText = "Quarterly";
            }
            ;
            if (model.period == "Y")
            {
                ViewBag.PeriodText = "Yearly";
            }
            ;
            return(View());
        }
Exemplo n.º 3
0
        public ActionResult Index(string obj)
        {
            BreadCrumb.Add(Url.Action("Index", "Home"), "Home");
            BreadCrumb.Add("/KPI/Index", "KPI");
            BreadCrumb.SetLabel("Compare");
            if (obj == null)
            {
                return(View());
            }
            var value    = obj.Split(';')[1].Split(',');
            var standard = value[0].ToInt();
            var unit     = value[1].ToString();
            var comp     = obj.Split(';')[0].ToString();


            var chartVM2s = new DataChartDAO().Compare2(comp);

            //var compare2 = new DataChartDAO().Compare2(comp);

            ViewBag.ChartVM2s = chartVM2s;
            if (chartVM2s[0].period == "W")
            {
                ViewBag.PeriodText = "Weekly"; ViewBag.Period = chartVM2s[0].period;
            }
            ;
            if (chartVM2s[0].period == "M")
            {
                ViewBag.PeriodText = "Monthly"; ViewBag.Period = chartVM2s[0].period;
            }
            if (chartVM2s[0].period == "Q")
            {
                ViewBag.PeriodText = "Quarterly"; ViewBag.Period = chartVM2s[0].period;
            }
            if (chartVM2s[0].period == "Y")
            {
                ViewBag.PeriodText = "Yearly"; ViewBag.Period = chartVM2s[0].period;
            }
            ViewBag.Standard = standard;
            ViewBag.Unit     = unit;

            return(View());
        }
Exemplo n.º 4
0
 public DatasetController()
 {
     _dao = new DataChartDAO();
 }