public IActionResult StoreContent() { if (ItemID < 1) { return(WriteErr("[产生错误的可能原因:您访问的商品信息不存在!")); } M_Product pinfo = proBll.GetproductByid(ItemID); if (pinfo == null) { return(WriteErr("[产生错误的可能原因:您访问的商品信息不存在!]")); } if (pinfo.UserShopID < 1) { Response.Redirect("/Shop/" + ItemID + ""); } M_CommonData storeMod = conBll.Store_SelModel(pinfo.UserShopID); if (!StoreCheck(storeMod, ref err)) { return(WriteErr(err)); } M_Store_Style styleMod = styleBll.SelReturnModel(storeMod.DefaultSkins); if (styleMod == null || string.IsNullOrEmpty(styleMod.Template_Content)) { return(WriteErr("尚未定义模板路径")); } string tlppath = styleMod.Template_Content; string ContentHtml = SafeSC.ReadFileStr(SiteConfig.SiteOption.TemplateDir + "/" + tlppath); ContentHtml = bll.CreateHtml(ContentHtml, 0, ItemID, 0); return(HtmlToClient(ContentHtml)); }
public IActionResult StoreIndex() { //if (ItemID < 1) { return WriteErr("店铺ID错误,StoreIndex?id=店铺ID");return; } M_CommonData storeMod = conBll.Store_SelModel(ItemID); if (!StoreCheck(storeMod, ref err)) { return(WriteErr(err)); } string tlppath = ""; if (!string.IsNullOrEmpty(storeMod.Template)) { tlppath = storeMod.Template; } else { M_Store_Style styleMod = styleBll.SelReturnModel(storeMod.DefaultSkins); if (styleMod != null) { tlppath = styleMod.Template_Index; } } if (string.IsNullOrEmpty(tlppath)) { return(WriteErr("尚未定义模板路径")); } string ContentHtml = SafeSC.ReadFileStr(SiteConfig.SiteOption.TemplateDir + "/" + tlppath); ContentHtml = bll.CreateHtml(ContentHtml, 0, ItemID, 0); return(HtmlToClient(ContentHtml)); }
public IActionResult StoreStyleAdd() { M_Store_Style styleMod = new M_Store_Style(); if (Mid > 0) { styleMod = styleBll.SelReturnModel(Mid); if (styleMod == null) { return(WriteErr("该店铺样式不存在")); } } return(View(styleMod)); }
private string GetTemplate(M_CommonData storeMod, string type) { M_Store_Style styleMod = styleBll.SelReturnModel(storeMod.DefaultSkins); switch (type) { case "index": break; case "content": break; case "list": break; } return(""); }
public IActionResult StoreStyleAdd_Submit() { M_Store_Style styleMod = new M_Store_Style(); if (Mid > 0) { styleMod = styleBll.SelReturnModel(Mid); } styleMod.StyleName = RequestEx["StyleName_T"]; styleMod.Template_Index = RequestEx["Template_Index_hid"]; styleMod.Template_Content = RequestEx["Template_Content_hid"]; styleMod.Template_List = RequestEx["Template_List_hid"]; styleMod.Remind = RequestEx["Remind_T"]; styleMod.Thumbnail = RequestEx["Thumbnail_t"]; if (styleMod.ID > 0) { styleBll.UpdateByID(styleMod); } else { styleBll.Insert(styleMod); } return(WriteOK("操作成功", "StoreStyle")); }
public bool UpdateByID(M_Store_Style model) { return(DBCenter.UpdateByID(model, model.ID)); }
public int Insert(M_Store_Style model) { return(DBCenter.Insert(model)); }