public void ThemeChange(int vendorId, StoreTheme theme) { var vendor = Db.Vendor.Find(vendorId); vendor.StoreTheme = theme; Db.Vendor.Update(vendor); }
protected void BindThemes() { ThemesGrid.DataBind(); StoreTheme.Items.Clear(); StoreTheme.DataBind(); Template.Items.Clear(); Template.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { _themesBasePath = Server.MapPath("~/App_Themes/"); if (!Page.IsPostBack) { StoreTheme.DataBind(); Template.DataBind(); // SET THE DEFAULT THEMES ON INITIAL POST string storeTheme = ThemeManager.GetDefaultStoreTheme(); SelectItem(StoreTheme, storeTheme); Template.SelectedIndex = 0; } }
public DbResponse ThemeChange(int vendorId, StoreTheme theme) { try { if (_db.Vendor.IsNull(vendorId)) { return(new DbResponse(false, "Vendor ID Not Found")); } _db.Vendor.ThemeChange(vendorId, theme); _db.SaveChanges(); return(new DbResponse(true, "Success")); } catch (Exception e) { return(new DbResponse(false, e.Message)); } }
public IActionResult ChangeTheme(int vendorId, StoreTheme theme) { var model = _vendor.ThemeChange(vendorId, theme); return(Json(model)); }