// GET: Dashboard
        public ActionResult FacilityDashboard()
        {
            ViewBag.Dash = "YES";
            int?facility_id = -1;

            if (new UserManagement().getCurrentuserFacility() != null)
            {
                facility_id = new UserManagement().getCurrentuserFacility();
            }
            var facility = context.A_Facilities.FirstOrDefault(a => a.FacilityCode == facility_id).Facility;

            ViewBag.DashboardPath = AppDomain.CurrentDomain.BaseDirectory.Replace("\\", "\\\\") + "Dashboards\\\\dashboard.sydx";
            DashboardWindowsServiceInfo dashboardViewer = new DashboardWindowsServiceInfo();

            ViewBag.Errormessage = dashboardViewer.Errormessage;
            ((IObjectContextAdapter)this.context).ObjectContext.CommandTimeout = 3000;
            // ViewBag.ServiceUrl = dashboardViewer.ServiceUrl;
            //ViewBag.ServiceUrl = "http://10.33.0.15:5556/DashboardService.svc";
            //ViewBag.ServiceUrl = "https://mascis.medicalaccess.co.ug:5556/";

            ViewBag.ServiceUrl = "https://mascis.medicalaccess.co.ug:5556/DashboardService.svc";

            ViewBag.filterParams = "Facility =" + GetNumbers(facility);//"Facility=fcName";
            return(View());
        }
        public ActionResult Dashboard()
        {
            ViewBag.Dash          = "YES";
            ViewBag.DashboardPath = AppDomain.CurrentDomain.BaseDirectory.Replace("\\", "\\\\") + "Dashboards\\\\mascis_home.sydx";
            DashboardWindowsServiceInfo dashboardViewer = new DashboardWindowsServiceInfo();

            ViewBag.Errormessage = dashboardViewer.Errormessage;
            ViewBag.ServiceUrl   = dashboardViewer.ServiceUrl;
            return(View());
        }
        public ActionResult SCTODashboard()
        {
            ViewBag.Dash = "YES";
            //ViewBag.DashboardPath = AppDomain.CurrentDomain.BaseDirectory.Replace("\\", "\\\\") + "Dashboards\\\\Mascis_FacilityDashboard.sydx";
            ViewBag.DashboardPath = AppDomain.CurrentDomain.BaseDirectory.Replace("\\", "\\\\") + "Dashboards\\\\dashboard.sydx";
            DashboardWindowsServiceInfo dashboardViewer = new DashboardWindowsServiceInfo();

            ViewBag.Errormessage = dashboardViewer.Errormessage;
            ((IObjectContextAdapter)this.context).ObjectContext.CommandTimeout = 3000;
            //ViewBag.ServiceUrl = dashboardViewer.ServiceUrl;
            ViewBag.ServiceUrl = "http://10.33.0.15:5556/DashboardService.svc";
            //ViewBag.ServiceUrl = "https://mascis.medicalaccess.co.ug:5556/";
            //ViewBag.ServiceUrl = "https://mascis.medicalaccess.co.ug:5556/DashboardService.svc";
            //if (user != null)//Check if the login user is valid or not
            //    ViewBag.filterParameters = "Company Id =" + Session["TenantId"]; //Tenant ID of the current user is get from session and passing to filter parameters variable.
            //else
            //    ViewBag.filterParameters = "";

            ViewBag.filterParams = "Facility =" + GetFacility(new UserManagement().getUserFacilityList());//"Facility=fcName";
            return(View());
        }