public void Actualizar(ESTADOASIENTO P) { try { new DatEstado_Asiento().Actualizar(P); } catch (Exception ex) { throw ex; } }
public int Insertar(ESTADOASIENTO P) { try { return new DatEstado_Asiento().Insertar(P); } catch (Exception ex) { throw ex; } }
public int Insertar(ESTADOASIENTO P) { try { ContextoDB ct = new ContextoDB(); ct.ESTADOASIENTO.Add(P); ct.SaveChanges(); return P.CEstadoAsiento; } catch (Exception ex) { throw ex; } }
public void Actualizar(ESTADOASIENTO P) { try { ContextoDB ct = new ContextoDB(); ESTADOASIENTO ESTADOASIENTO = ct.ESTADOASIENTO.Where(x => x.CEstadoAsiento == P.CEstadoAsiento).SingleOrDefault(); if (ESTADOASIENTO != null) { ct.Entry(ESTADOASIENTO).CurrentValues.SetValues(P); ct.SaveChanges(); } } catch (Exception ex) { throw ex; } }