Beispiel #1
0
        /// <summary>
        /// The sort dashboard parameters.
        /// </summary>
        /// <returns>
        /// The <see cref="ActionResult"/>.
        /// </returns>
        public ActionResult SortDashboardParameters()
        {
            int corporateid = Helpers.GetSysAdminCorporateID();
            int facilityid  = Helpers.GetDefaultFacilityId();

            using (var bal = new DashboardParametersBal())
            {
                List <DashboardParametersCustomModel> list = bal.GetDashboardParametersList(corporateid, facilityid);
                return(this.PartialView(PartialViews.DashboardParametersList, list));
            }
        }
Beispiel #2
0
        /// <summary>
        ///     Get the details of the DashboardParameters View in the Model DashboardParameters such as DashboardParametersList,
        ///     list of countries etc.
        /// </summary>
        /// <returns>
        ///     returns the actionresult in the form of current object of the Model DashboardParameters to be passed to View
        ///     DashboardParameters
        /// </returns>
        public ActionResult Index()
        {
            // Initialize the DashboardParameters BAL object
            using (var bal = new DashboardParametersBal())
            {
                // Get the Entity list
                int corporateid = Helpers.GetSysAdminCorporateID();
                int facilityid  = Helpers.GetDefaultFacilityId();
                List <DashboardParametersCustomModel> list = bal.GetDashboardParametersList(corporateid, facilityid);

                // Intialize the View Model i.e. DashboardParametersView which is binded to Main View Index.cshtml under DashboardParameters
                var viewModel = new DashboardParametersView
                {
                    DashboardParametersList    = list,
                    CurrentDashboardParameters = new DashboardParameters()
                };

                // Pass the View Model in ActionResult to View DashboardParameters
                return(View(viewModel));
            }
        }