Example #1
0
        public static bool CreatePV(PackageVip pv)
        {
            var en = new ProjectNCTEntities();

            en.PackageVips.Add(pv);
            return(en.SaveChanges() > 0 ? true : false);
        }
        // POST api/<controller>
        public IHttpActionResult Post(PackageVipView s)
        {
            var item = new PackageVip {
                ID = s.PVipID, PVipName = s.PVipName, PVipMonths = s.PVipMonths, PVipPrice = s.PVipPrice
            };
            var res = Repositories.CreatePV(item);

            if (res == true)
            {
                return(Ok());
            }
            return(InternalServerError());
        }
 public static bool CreatePV(PackageVip pv)
 {
     return(PackageVipDAO.CreatePV(pv));
 }
Example #4
0
 public static bool CreatePV(PackageVip pv)
 {
     return(PaymentBUS.CreatePV(pv));
 }
Example #5
0
 //update
 public void Update(PackageVip packageVip)
 {
     db.Entry(packageVip).State = EntityState.Modified;
     db.SaveChanges();
 }
Example #6
0
 public PackageVip CreatePackageVip(PackageVip packageVip)
 {
     db.PackageVips.Add(packageVip);
     db.SaveChanges();
     return(packageVip);
 }