public ActionResult Footer(string act, string ctrl, string type_act, string type, string lang)
        {
            var           footer_view   = new Web.Areas.Admin.ViewModels.Footer_view();
            WebInfoModels webInfoModels = new WebInfoModels();

            if (string.IsNullOrEmpty(act))
            {
                act = Request.QueryString["act"] != null ? Request.QueryString["act"].ToString() : "footer";
            }

            if (string.IsNullOrEmpty(ctrl))
            {
                ctrl = Request.QueryString["ctrl"] != null ? Request.QueryString["ctrl"].ToString() : "adminGeneral";
            }

            if (string.IsNullOrEmpty(type_act))
            {
                type_act = Request.QueryString["type_act"] != null ? Request.QueryString["type_act"].ToString() : CommonGlobal.View;
            }

            if (string.IsNullOrEmpty(lang))
            {
                lang = LanguageModels.ActiveLanguage().LangCultureName;
            }

            try
            {
                footer_view.Footer  = GeneralModels.GetContent(CommonGlobal.PageFooter, lang);
                footer_view.Footer1 = GeneralModels.GetContent(CommonGlobal.PageFooter1, lang);
                footer_view.Footer2 = GeneralModels.GetContent(CommonGlobal.PageFooter2, lang);
                footer_view.Footer3 = GeneralModels.GetContent(CommonGlobal.PageFooter3, lang);
                footer_view.Footer4 = GeneralModels.GetContent(CommonGlobal.PageFooter4, lang);
                footer_view.Footer5 = GeneralModels.GetContent(CommonGlobal.PageFooter5, lang);
            }
            catch (Exception)
            {
                footer_view.Message = "Đã xảy ra lỗi trong quá trình lấy dữ liệu.";
            }

            ////Link tab
            StringBuilder sb = new StringBuilder();

            sb.Append("<li><a href=\"" + Url.Action("index", "dashboard", new { act = "system_config", ctrl = "adminGeneral", type_act = CommonGlobal.Edit }) + "\"><span>Cấu hình chung</span></a></li>");
            sb.Append("<li><a href=\"" + Url.Action("index", "dashboard", new { act = "system_email", ctrl = "adminGeneral", type_act = CommonGlobal.Edit }) + "\"><span>Cấu hình email</span></a></li>");
            sb.Append("<li class=\"active\"><a href=\"#\"><span>Footer</span></a></li>");
            footer_view.Html_link_tab = sb.ToString();
            ////list language
            footer_view.List_language = this.List_select_language(lang);
            ////action
            footer_view.Type              = type;
            footer_view.Type_act          = type_act;
            footer_view.Act               = act;
            footer_view.Ctrl              = ctrl;
            footer_view.Parent_action     = HttpContext.Request.RequestContext.RouteData.Values["action"].ToString();
            footer_view.Parent_controller = HttpContext.Request.RequestContext.RouteData.Values["controller"].ToString();
            ////end action

            return(this.PartialView("../control/footer", footer_view));
        }
        public ActionResult Footer(FormCollection collection)
        {
            GeneralModels generalModels = new GeneralModels();
            C_General     general       = new C_General();
            var           footer_view   = new Web.Areas.Admin.ViewModels.Footer_view();

            this.TryUpdateModel(footer_view);

            ////action
            footer_view.Parent_action     = HttpContext.Request.RequestContext.RouteData.Values["action"].ToString();
            footer_view.Parent_controller = HttpContext.Request.RequestContext.RouteData.Values["controller"].ToString();
            ////end action
            ////list language
            footer_view.List_language = this.List_select_language(footer_view.Lang);
            ////Link tab
            StringBuilder sb = new StringBuilder();

            sb.Append("<li><a href=\"" + Url.Action("index", "dashboard", new { act = "system_config", ctrl = "adminGeneral", type_act = CommonGlobal.Edit }) + "\"><span>Cấu hình chung</span></a></li>");
            sb.Append("<li><a href=\"" + Url.Action("index", "dashboard", new { act = "system_email", ctrl = "adminGeneral", type_act = CommonGlobal.Edit }) + "\"><span>Cấu hình email</span></a></li>");
            sb.Append("<li class=\"active\"><a href=\"#\"><span>Footer</span></a></li>");
            footer_view.Html_link_tab = sb.ToString();

            try
            {
                if (footer_view.IsUpdate > 0 && footer_view.Type_act == CommonGlobal.Edit)
                {
                    general                = generalModels.GetGeneral(CommonGlobal.PageFooter, footer_view.Lang);
                    general.Lang           = footer_view.Lang;
                    general.GeneralContent = footer_view.Footer != null ? footer_view.Footer : string.Empty;
                    general.Show           = true;
                    generalModels.Edit(general);

                    general                = generalModels.GetGeneral(CommonGlobal.PageFooter1, footer_view.Lang);
                    general.Lang           = footer_view.Lang;
                    general.GeneralContent = footer_view.Footer1 != null ? footer_view.Footer1 : string.Empty;
                    general.Show           = true;
                    generalModels.Edit(general);

                    general                = generalModels.GetGeneral(CommonGlobal.PageFooter2, footer_view.Lang);
                    general.Lang           = footer_view.Lang;
                    general.GeneralContent = footer_view.Footer2 != null ? footer_view.Footer2 : string.Empty;
                    general.Show           = true;
                    generalModels.Edit(general);

                    general                = generalModels.GetGeneral(CommonGlobal.PageFooter3, footer_view.Lang);
                    general.Lang           = footer_view.Lang;
                    general.GeneralContent = footer_view.Footer3 != null ? footer_view.Footer3 : string.Empty;
                    general.Show           = true;
                    generalModels.Edit(general);

                    general                = generalModels.GetGeneral(CommonGlobal.PageFooter4, footer_view.Lang);
                    general.Lang           = footer_view.Lang;
                    general.GeneralContent = footer_view.Footer4 != null ? footer_view.Footer4 : string.Empty;
                    general.Show           = true;
                    generalModels.Edit(general);

                    general                = generalModels.GetGeneral(CommonGlobal.PageFooter5, footer_view.Lang);
                    general.Lang           = footer_view.Lang;
                    general.GeneralContent = footer_view.Footer5 != null ? footer_view.Footer5 : string.Empty;
                    general.Show           = true;
                    generalModels.Edit(general);

                    footer_view.Message = "Cập nhật thành công.";
                }
            }
            catch (Exception)
            {
                footer_view.Message = "Đã xảy ra lỗi cập nhật dữ liệu.";
            }

            return(this.PartialView("../control/footer", footer_view));
        }