Пример #1
0
        public APIReturn _Add([FromForm] uint?Franchising_id, [FromForm] uint?Shop_id)
        {
            Shop_franchisingInfo item = new Shop_franchisingInfo();

            item.Franchising_id = Franchising_id;
            item.Shop_id        = Shop_id;
            item = Shop_franchising.Insert(item);
            return(APIReturn.成功.SetData("item", item.ToBson()));
        }
Пример #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);
        }