Example #1
0
 public bool Update()
 {
     datos.Onbreak2Entities bbdd = new datos.Onbreak2Entities();
     try
     {
         datos.Cliente clie = bbdd.Cliente.First(c => c.RutCliente == RutCliente);
         CommonBC.Syncronize(this, clie);
         bbdd.SaveChanges();
         return(true);
     }
     catch (Exception ex)
     {
         return(false);
     }
 }
Example #2
0
 public bool Delete()
 {
     datos.Onbreak2Entities bbdd = new datos.Onbreak2Entities();
     try
     {
         datos.Cliente clie = bbdd.Cliente.First(c => c.RutCliente == RutCliente);
         bbdd.Cliente.Remove(clie);
         bbdd.SaveChanges();
         return(true);
     }
     catch
     {
         return(false);
     }
 }
Example #3
0
 public bool Update()
 {
     datos.Onbreak2Entities bbdd = new datos.Onbreak2Entities();
     try
     {
         datos.CoffeeBreak cb = bbdd.CoffeeBreak.First(c => c.Numero == Numero);
         CommonBC.Syncronize(this, cb);
         bbdd.SaveChanges();
         return(true);
     }
     catch (Exception ex)
     {
         return(false);
     }
 }
Example #4
0
 public bool Delete()
 {
     datos.Onbreak2Entities bbdd = new datos.Onbreak2Entities();
     try
     {
         datos.CoffeeBreak cb = bbdd.CoffeeBreak.First(c => c.Numero == Numero);
         bbdd.CoffeeBreak.Remove(cb);
         bbdd.SaveChanges();
         return(true);
     }
     catch
     {
         return(false);
     }
 }
Example #5
0
 public bool Delete()
 {
     datos.Onbreak2Entities bbdd = new datos.Onbreak2Entities();
     try
     {
         datos.Contrato cont = bbdd.Contrato.First(c => c.Numero == Numero);
         bbdd.Contrato.Remove(cont);
         bbdd.SaveChanges();
         return(true);
     }
     catch (Exception ex)
     {
         return(false);
     }
 }
Example #6
0
 public bool Create()
 {
     datos.Onbreak2Entities bbdd = new datos.Onbreak2Entities();
     datos.Cliente          clie = new datos.Cliente();
     try
     {
         CommonBC.Syncronize(this, clie);
         bbdd.Cliente.Add(clie);
         bbdd.SaveChanges();
         return(true);
     }
     catch (Exception ex)
     {
         bbdd.Cliente.Remove(clie);
         return(false);
     }
 }