// GET: Category
        public ActionResult Index(string type)
        {
            var dict = new Dictionary <string, object>();

            type = string.IsNullOrEmpty(type) ? "0" : type;
            ArticleType articletype  = (ArticleType)Enum.Parse(typeof(ArticleType), type);
            var         data_Article = DefaultView.FE_Article.GetByArticleType(articletype);

            dict["data_Article"]       = data_Article == null ? new FE_Article() : data_Article;
            dict["list_TopicContacts"] = CustomModel.GetTopicContactDDl();

            ViewBag.Title = ((DefaultView.FE_Article)dict["data_Article"]).ArticleName;
            return(View(dict));
        }
Exemple #2
0
        //===============================================Import export==================================================

        //===============================================Openpopup======================================================


        #endregion
        #region Form
        public ActionResult FormPopup(string entryid, string entrykey, string redirectbyajax)
        {
            IDbConnection dbConn = new OrmliteConnection().openConn();
            var           dict   = new Dictionary <string, object>();

            dict["activestatus"]       = CustomModel.GetActiveStatus();
            dict["list_TopicContacts"] = CustomModel.GetTopicContactDDl();
            dbConn.Close();

            //set parameter

            dict["redirectbyajax"] = redirectbyajax;
            ViewBag.entryid        = string.IsNullOrEmpty(entryid) ? "0" : entryid;
            ViewBag.entrykey       = string.IsNullOrEmpty(entrykey) ? "0" : entrykey;
            return(View("ContactRequestManagementForm", dict));
        }
Exemple #3
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["list_TopicContacts"] = CustomModel.GetTopicContactDDl();
            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("ContactRequestManagementTree", dict));
        }