Esempio n. 1
0
        public ActionResult Edit([FromQuery] uint Franchising_id, [FromQuery] uint Shop_id)
        {
            Shop_franchisingInfo item = Shop_franchising.GetItem(Franchising_id, Shop_id);

            if (item == null)
            {
                return(APIReturn.记录不存在_或者没有权限);
            }
            ViewBag.item = item;
            return(View());
        }
Esempio n. 2
0
        public Shop_franchisingInfo FlagFranchising(uint?Franchising_id)
        {
            Shop_franchisingInfo item = Shop_franchising.GetItem(Franchising_id.Value, this.Id.Value);

            if (item == null)
            {
                item = Shop_franchising.Insert(new Shop_franchisingInfo {
                    Franchising_id = Franchising_id,
                    Shop_id        = this.Id
                });
            }
            return(item);
        }
Esempio n. 3
0
        public APIReturn _Edit([FromQuery] uint Franchising_id, [FromQuery] uint Shop_id)
        {
            Shop_franchisingInfo item = Shop_franchising.GetItem(Franchising_id, Shop_id);

            if (item == null)
            {
                return(APIReturn.记录不存在_或者没有权限);
            }
            int affrows = Shop_franchising.Update(item);

            if (affrows > 0)
            {
                return(APIReturn.成功.SetMessage($"更新成功,影响行数:{affrows}"));
            }
            return(APIReturn.失败);
        }