Exemple #1
0
        /// <summary>
        /// Get the details of the DashboardDisplayOrder View in the Model DashboardDisplayOrder such as DashboardDisplayOrderList, list of countries etc.
        /// </summary>
        /// <returns>
        /// returns the actionresult in the form of current object of the Model DashboardDisplayOrder to be passed to View DashboardDisplayOrder
        /// </returns>
        public ActionResult Index()
        {
            //Initialize the DashboardDisplayOrder BAL object
            using (var bal = new DashboardDisplayOrderBal())
            {
                //Get the Entity list
                var list = bal.GetDashboardDisplayOrderList(Helpers.GetSysAdminCorporateID());

                //Intialize the View Model i.e. DashboardDisplayOrderView which is binded to Main View Index.cshtml under DashboardDisplayOrder
                var viewModel = new DashboardDisplayOrderView
                {
                    DashboardDisplayOrderList    = list,
                    CurrentDashboardDisplayOrder = new DashboardDisplayOrder()
                };

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