Ejemplo n.º 1
0
        public void SetClosed(Refill refill)
        {
            var refillUpdate = refill.Id > 0 ? GetById(refill.Id) : new Refill();

            if (!(refill.Id > 0)) return;

            var refillDa = new RefillDa(databasecontext);
            refillUpdate.Closed = true;
            refillDa.Update(refillUpdate);
        }
Ejemplo n.º 2
0
 public void Delete(Refill refill)
 {
     _databasecontext.Refills.Remove(refill);
     _databasecontext.SaveChanges();
 }
Ejemplo n.º 3
0
 public Refill Update(Refill refill)
 {
     _databasecontext.SaveChanges();
     return refill;
 }
Ejemplo n.º 4
0
 public Refill Add(Refill refill)
 {
     _databasecontext.Refills.Add(refill);
     _databasecontext.SaveChanges();
     return refill;
 }