Esempio n. 1
0
        public APIReturn _Add([FromForm] uint?Factory_id, [FromForm] uint?Franchising_id)
        {
            Factory_franchisingInfo item = new Factory_franchisingInfo();

            item.Factory_id     = Factory_id;
            item.Franchising_id = Franchising_id;
            item = Factory_franchising.Insert(item);
            return(APIReturn.成功.SetData("item", item.ToBson()));
        }
Esempio n. 2
0
        public Factory_franchisingInfo FlagFranchising(uint?Franchising_id)
        {
            Factory_franchisingInfo item = Factory_franchising.GetItem(this.Id.Value, Franchising_id.Value);

            if (item == null)
            {
                item = Factory_franchising.Insert(new Factory_franchisingInfo {
                    Factory_id     = this.Id,
                    Franchising_id = Franchising_id
                });
            }
            return(item);
        }