public IActionResult StoreUpdate_Submit() { M_CommonData storeMod = new M_CommonData(); M_UserInfo mu = buser.SelReturnModel(DataConverter.CLng(RequestEx["UserName_H"])); if (Mid > 0) { storeMod = conBll.SelReturnModel(Mid); } else { storeMod.ModelID = Convert.ToInt32(modBll.SelByType("6").Rows[0]["ModelID"]); M_ModelInfo modMod = modBll.SelReturnModel(storeMod.ModelID); storeMod.TableName = modMod.TableName; } storeMod.SuccessfulUserID = mu.UserID; storeMod.Inputer = mu.UserName; storeMod.Title = RequestEx["UserShopName_T"]; storeMod.DefaultSkins = DataConverter.CLng(RequestEx["TlpView_Tlp"]); DataTable dt = mfBll.GetModelFieldList(storeMod.ModelID); DataTable table = Call.GetDTFromMVC(dt, Request); table = storeBll.FillDT(storeMod, table); if (storeMod.GeneralID > 0) { conBll.UpdateContent(table, storeMod); } else { conBll.AddContent(table, storeMod); } return(WriteOK("操作成功", "StoreUpdate")); }
protected void Esubmit_Click(object sender, EventArgs e) { M_CommonData storeMod = new M_CommonData(); M_UserInfo mu = buser.SelReturnModel(DataConverter.CLng(UserName_H.Value)); if (mu.IsNull) { function.WriteErrMsg("未为店铺指定用户"); } if (Mid > 0) { storeMod = conBll.SelReturnModel(Mid); } else { storeMod.ModelID = Convert.ToInt32(modBll.SelByType("6").Rows[0]["ModelID"]); M_ModelInfo modMod = modBll.SelReturnModel(storeMod.ModelID); storeMod.TableName = modMod.TableName; } storeMod.SuccessfulUserID = mu.UserID; storeMod.Inputer = mu.UserName; storeMod.Title = UserShopName_T.Text; storeMod.DefaultSkins = DataConverter.CLng(TlpView_Tlp.SelectedID); storeMod.SpecialID = BindWX_DP.SelectedValue; DataTable dt = this.mfbll.GetModelFieldList(storeMod.ModelID); DataTable table = new Call().GetDTFromPage(dt, this, ViewState); table = stBll.FillDT(storeMod, table); if (storeMod.GeneralID > 0) { conBll.UpdateContent(table, storeMod); } else { storeMod.GeneralID = conBll.AddContent(table, storeMod); } mu.SiteID = storeMod.GeneralID; buser.UpdateByID(mu); function.WriteSuccessMsg("操作成功", "StoreManage.aspx"); }
public ActionResult Apply_Add() { B_Store_Info stBll = new B_Store_Info(); int modelid = DataConvert.CLng(Request.Form["model_dp"]); string store = Request.Form["store_t"]; M_CommonData CData = conBll.SelMyStore(mu.UserName); if (CData == null) { CData = new M_CommonData(); } //---------------------------------------- if (string.IsNullOrEmpty(store)) { function.WriteErrMsg("店铺名称不能为空"); return(Content("")); } //M_StoreStyleTable sst = sstbll.GetNewStyle(modelid); //if (sst.ID == 0) { function.WriteErrMsg("后台没有为该模型绑定可用的模板!"); return Content(""); } CData.Title = HttpUtility.HtmlEncode(Request.Form["store_t"]); CData.DefaultSkins = DataConverter.CLng(Request.Form["TempleID_Hid"]); CData.ModelID = modelid; CData.TableName = modBll.SelReturnModel(CData.ModelID).TableName; CData.Inputer = mu.UserName; CData.SuccessfulUserID = mu.UserID; CData.Inputer = mu.UserName; CData.IP = IPScaner.GetUserIP(); DataTable dt = fieldBll.GetModelFieldList(modelid); DataTable table = new Call().GetDTFromMVC(dt, Request); table = stBll.FillDT(CData, table); if (CData.GeneralID > 0) { conBll.UpdateContent(table, CData); } else { conBll.AddContent(table, CData); } return(View("StoreAuditing")); }