Exemple #1
0
        public APIReturn _Add([FromForm] uint?Member_id, [FromForm] uint?Shop_id)
        {
            Member_shopInfo item = new Member_shopInfo();

            item.Member_id   = Member_id;
            item.Shop_id     = Shop_id;
            item.Create_time = DateTime.Now;
            item             = Member_shop.Insert(item);
            return(APIReturn.成功.SetData("item", item.ToBson()));
        }
Exemple #2
0
 public Member_shopInfo Save()
 {
     if (this.Member_id != null && this.Shop_id != null)
     {
         Member_shop.Update(this);
         return(this);
     }
     this.Create_time = DateTime.Now;
     return(Member_shop.Insert(this));
 }
Exemple #3
0
        public Member_shopInfo FlagMember(uint?Member_id, DateTime?Create_time)
        {
            Member_shopInfo item = Member_shop.GetItem(Member_id.Value, this.Id.Value);

            if (item == null)
            {
                item = Member_shop.Insert(new Member_shopInfo {
                    Member_id   = Member_id,
                    Shop_id     = this.Id,
                    Create_time = Create_time
                });
            }
            else
            {
                item.UpdateDiy
                .SetCreate_time(Create_time).ExecuteNonQuery();
            }
            return(item);
        }