Ejemplo n.º 1
0
        public ActionResult EditStoreKeeper(StoreKeeperModel model, int storeId = -1)
        {
            StoreKeeperInfo storeKeeperInfo = AdminStores.GetStoreKeeperById(storeId);
            if (storeKeeperInfo == null)
                return PromptView("店长不存在");

            if (ModelState.IsValid)
            {
                storeKeeperInfo.Type = model.Type;
                storeKeeperInfo.Name = model.StoreKeeperName;
                storeKeeperInfo.IdCard = model.IdCard;
                storeKeeperInfo.Address = model.Address;

                AdminStores.UpdateStoreKeeper(storeKeeperInfo);
                AddMallAdminLog("修改店长", "修改店长,店铺ID为:" + storeId);
                return PromptView("店长修改成功");
            }

            ViewData["referer"] = MallUtils.GetMallAdminRefererCookie();
            return View(model);
        }
Ejemplo n.º 2
0
        public ActionResult EditStoreKeeper(int storeId = -1)
        {
            StoreKeeperInfo storeKeeperInfo = AdminStores.GetStoreKeeperById(storeId);
            if (storeKeeperInfo == null)
                return PromptView("店长不存在");

            StoreKeeperModel model = new StoreKeeperModel();
            model.Type = storeKeeperInfo.Type;
            model.StoreKeeperName = storeKeeperInfo.Name;
            model.IdCard = storeKeeperInfo.IdCard;
            model.Address = storeKeeperInfo.Address;

            ViewData["referer"] = MallUtils.GetMallAdminRefererCookie();
            return View(model);
        }