Exemple #1
0
        public ActionResult Index(string redirectbyajax, string entryid, string actiontype, string fa)
        {
            //fa: form another - default form popup
            IDbConnection dbConn = new OrmliteConnection().openConn();
            var           dict   = new Dictionary <string, object>();

            dict["activestatus"]   = CustomModel.GetActiveStatus();
            dict["listlanguage"]   = CustomModel.GetLanguage();
            dict["areasname"]      = "Admin";
            dict["redirectbyajax"] = string.IsNullOrEmpty(redirectbyajax) ? "0" : "1";
            dbConn.Close();


            var dataModel = HomePage.GetLast();

            if (dataModel == null)
            {
                dataModel = new HomePage();
            }
            dict["dataModel"] = dataModel;
            dbConn.Close();

            //param cho form
            ViewBag.entryid    = dataModel.entryid == 0 ? "0" : dataModel.entryid.ToString();
            ViewBag.actiontype = string.IsNullOrEmpty(actiontype) ? "" : actiontype;
            ViewBag.fa         = string.IsNullOrEmpty(fa) ? "" : fa;
            return(View("HomePageManagementTree", dict));
        }
        public ActionResult Index(string redirectbyajax, string entryid, string actiontype, string fa)
        {
            //fa: form another - default form popup
            IDbConnection dbConn = new OrmliteConnection().openConn();
            var           dict   = new Dictionary <string, object>();

            dict["activestatus"]   = CustomModel.GetActiveStatus();
            dict["listLoginType"]  = CustomModel.GetLoginTypeDDL();
            dict["listlanguage"]   = CustomModel.GetLanguage();
            dict["areasname"]      = "Admin";
            dict["redirectbyajax"] = string.IsNullOrEmpty(redirectbyajax) ? "0" : "1";
            dbConn.Close();

            //param cho form
            ViewBag.entryid    = string.IsNullOrEmpty(entryid) ? "0" : entryid;
            ViewBag.actiontype = string.IsNullOrEmpty(actiontype) ? "" : actiontype;
            ViewBag.fa         = string.IsNullOrEmpty(fa) ? "" : fa;
            return(View("UserManagementTree", dict));
        }