示例#1
0
        public void ThemeChange(int vendorId, StoreTheme theme)
        {
            var vendor = Db.Vendor.Find(vendorId);

            vendor.StoreTheme = theme;
            Db.Vendor.Update(vendor);
        }
示例#2
0
 protected void BindThemes()
 {
     ThemesGrid.DataBind();
     StoreTheme.Items.Clear();
     StoreTheme.DataBind();
     Template.Items.Clear();
     Template.DataBind();
 }
示例#3
0
        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;
            }
        }
示例#4
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));
            }
        }
示例#5
0
        public IActionResult ChangeTheme(int vendorId, StoreTheme theme)
        {
            var model = _vendor.ThemeChange(vendorId, theme);

            return(Json(model));
        }