Beispiel #1
0
 public int DeleteAvailableTimings(int id)
 {
     using (_db)
     {
         tblAvailableTiming available = _db.tblAvailableTimings.Where(u => u.Id == id).FirstOrDefault();
         _db.tblAvailableTimings.Remove(available);
         return(_db.SaveChanges());
     }
 }
Beispiel #2
0
 public int UpdateAvailableTiming(BOAvailableTiming model)
 {
     using (_db)
     {
         tblAvailableTiming available = _db.tblAvailableTimings.Where(u => u.Id == model.Id).FirstOrDefault();
         available.Date        = model.Date;
         available.StartTime   = model.StartTime;
         available.EndTime     = model.EndTime;
         available.IsAvailable = model.IsAvailable;
         available.VipId       = model.VipId;
         return(_db.SaveChanges());
     }
 }
Beispiel #3
0
 public int AddAvailableTiming(BOAvailableTiming model)
 {
     using (_db)
     {
         tblAvailableTiming available = new tblAvailableTiming();
         available.Date        = model.Date;
         available.StartTime   = model.StartTime;
         available.EndTime     = model.EndTime;
         available.IsAvailable = model.IsAvailable;
         available.VipId       = model.VipId;
         _db.tblAvailableTimings.Add(available);
         return(_db.SaveChanges());
     }
 }