예제 #1
0
 public bool modificarLote(tbLotes lote)
 {
     try {
         db.Entry(lote).State = EntityState.Modified;
         db.SaveChanges();
         return(true);
     } catch (Exception) {
         return(false);
     }
 }
예제 #2
0
 public bool agregarLote(tbLotes lote)
 {
     try {
         db.tbLotes.Add(lote);
         db.SaveChanges();
         return(true);
     } catch (Exception) {
         return(false);
     }
 }
예제 #3
0
 public bool decrementarLote(tbLotes lote)
 {
     try {
         var query = (from e in db.tbLotes where e.CodLote == lote.CodLote select e).FirstOrDefault();
         query.Cantidad = lote.Cantidad;
         db.SaveChanges();
         return(true);
     } catch (Exception) {
         return(false);
     }
 }