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); } }
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); } }
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); } }
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); } }
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); } }
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); } }