Exemple #1
0
 public CouponEntity Create(CouponEntity entity)
 {
     try
     {
         _couponRepository.Insert(entity);
         return entity;
     }
     catch (Exception e)
     {
         _log.Error(e,"数据库操作出错");
         return null;
     }
 }
Exemple #2
0
 public bool Delete(CouponEntity entity)
 {
     try
     {
         _couponRepository.Delete(entity);
         return true;
     }
     catch (Exception e)
     {
         _log.Error(e,"数据库操作出错");
         return false;
     }
 }
Exemple #3
0
        public bool Post(CouponModel model)
        {
            var entity = new CouponEntity
            {

                Guid = model.Guid,

                Type = model.Type,

                DisCount = model.DisCount,

            //				Product = model.Product,

                ExpireTime = model.ExpireTime,

                Status = model.Status,

                Adduser = model.Adduser,

                Addtime = model.Addtime,

                Upduser = model.Upduser,

                Updtime = model.Updtime,

                Owner = model.Owner,

            };
            if(_CouponService.Create(entity).Id > 0)
            {
                return true;
            }
            return false;
        }