//public ActionResult Index() //{ // C_TempletApp templetApp = new C_TempletApp(); // C_TempletEntity model = templetApp.GetMain(); // string htmls = Server.HtmlDecode(model.F_Content); // return Content(htmls); //} public ActionResult Index(string name) { C_TempletApp templetApp = new C_TempletApp(); C_TempletEntity model = new C_TempletEntity(); C_ModulesApp modulesApp = new C_ModulesApp(); C_ModulesEntity moduleentity = new C_ModulesEntity(); if (string.IsNullOrEmpty(name)) { model = templetApp.GetMain(); moduleentity = modulesApp.GetMain(); } else { model = templetApp.GetModelByActionName(name); moduleentity = modulesApp.GetFormByActionName(name); } string htmls = Server.HtmlDecode(model.F_Content); if (moduleentity != null) { TempHelp temphelp = new TempHelp(); htmls = temphelp.GetHtmlPages(htmls, moduleentity.F_Id); } return(Content(htmls)); }
/// <summary> /// 根据模板名称获取模板信息 /// </summary> /// <returns></returns> private string GetHtmlsByTempletName(string name, string Id) { string strs = ""; C_TempletApp templetapp = new C_TempletApp(); C_TempletEntity templet = templetapp.GetFormByName(name); if (templet != null) { string templets = System.Web.HttpUtility.HtmlDecode(templet.F_Content); TempHelp temphelp = new TempHelp(); strs = temphelp.GetHtmlPages(templets, Id); } return(strs); }