Esempio n. 1
0
        public ActionResult SetMallAdminer(int storeId = -1)
        {
            StoreInfo storeInfo = AdminStores.GetStoreById(storeId);

            if (storeInfo == null)
            {
                return(PromptView("店铺不存在"));
            }

            MallAdminerModel model = new MallAdminerModel();

            return(View(model));
        }
Esempio n. 2
0
        public ActionResult SetMallAdminer(MallAdminerModel model, int storeId = -1)
        {
            StoreInfo storeInfo = AdminStores.GetStoreById(storeId);

            if (storeInfo == null)
            {
                return(PromptView("店铺不存在"));
            }

            int uid = AdminUsers.GetUidByAccountName(model.AccountName);

            if (uid < 1)
            {
                ModelState.AddModelError("AccountName", "账号不存在");
            }

            if (ModelState.IsValid)
            {
                AdminUsers.SetStoreAdminer(uid, storeId);
                AddMallAdminLog("设置店铺管理员", "设置店铺管理员,店铺ID为:" + storeId);
                return(PromptView("店铺管理员设置成功"));
            }
            return(View(model));
        }