Exemplo n.º 1
0
        public ActionResult SiteGrid(int Page, int SiteId, string filter)
        {
            DashboardVM vm            = new DashboardVM();
            DashboardBL loDashboardBL = new DashboardBL();

            try
            {
                //SINGLE_SITE
                //SiteDashboard
                int offset = (Page - 1) * 5;
                vm           = loDashboardBL.GetDashboardSiteVM(null, null, DateTime.Now, DateTime.Now, null, SiteId, null, 0, ViewBag.UserId, filter, offset, 5, "0");
                ViewBag.Show = "no";
                ViewBag.view = "SiteDashboard";

                foreach (var item in vm.ClientSites.Sites)
                {
                    ViewBag.Latitude  = item.Latitude;
                    ViewBag.Longitude = item.Longitude;
                    break;
                }


                return(PartialView("~/Views/Dashboard/_SiteGrid.cshtml", vm.ClientSites));
            }
            catch (System.Exception)
            {
                return(null);
            }
        }
Exemplo n.º 2
0
        public ActionResult getLeftPanel(int Page, int SiteId, string filter)
        {
            DashboardVM vm = new DashboardVM();

            ViewBag.SiteIds = SiteId;
            DashboardBL loDashboardBL = new DashboardBL();

            try
            {
                //SINGLE_SITE
                //SiteDashboard
                int offset = (Page - 1) * 5;
                vm = loDashboardBL.GetDashboardSiteVM(null, null, DateTime.Now, DateTime.Now, null, SiteId, null, 0, ViewBag.UserId, filter, offset, 5, "0");
                string scope = "";


                foreach (var item in vm.ClientSites.Sites)
                {
                    scope = item.Scope;
                }


                if (scope == "SSV" || scope == "NI" || scope == "IND")
                {
                    List <BandVM> lstBands = loSitesBL.GetSiteBands("", SiteId);
                    return(PartialView("_left_panel_ssv_ni_ind", lstBands));
                }
                else if (scope == "TSS")
                {
                    TSS_VMBL vmb = new TSS_VMBL();
                    var      TSS = vmb.ToList("", SiteId.ToString());
                    return(PartialView("~/Views/Dashboard/_SiteGridTSS.cshtml", TSS));
                }
                else if (scope == "CLS")
                {
                    CLS_VMBL vmb = new CLS_VMBL();
                    var      CLS = vmb.ToList("", SiteId.ToString());
                    return(PartialView("~/Views/Dashboard/_SiteGridCLS.cshtml", CLS));
                }
                else
                {
                    return(Content("No Scope"));
                }
            }
            catch (System.Exception)
            {
                return(null);
            }
        }