public int update(FechaDePagoEntity fecha) { using (FechaDePagoData fechadepagoData = new FechaDePagoData()) { return fechadepagoData.update(fecha); } }
public int delete(FechaDePagoEntity fecha) { using (FechaDePagoData fechadepagoData = new FechaDePagoData()) { return(fechadepagoData.delete(fecha)); } }
public int insert(FechaDePagoEntity fecha) { using (var fechadepagoData = new FechaDePagoData()) { return fechadepagoData.insert(fecha); } }
public int insert(FechaDePagoEntity fecha) { using (var fechadepagoData = new FechaDePagoData()) { return(fechadepagoData.insert(fecha)); } }
public int insert(FechaDePagoEntity fecha) { MyLog4Net.Instance.getCustomLog(this.GetType()).Info("Agregando: " + fecha.FechaDePago); try { StringBuilder sql = new StringBuilder(); sql.Append(" INSERT INTO "); sql.Append(this.tabla); sql.Append(" VALUES("); sql.Append(fecha.IdLiquidacion); sql.Append(", '"); sql.Append(fecha.FechaDePago); sql.Append("')"); return(Model.DB.ejecutarProceso(Model.TipoComando.Texto, sql.ToString())); } catch (Exception ex) { MyLog4Net.Instance.getCustomLog(this.GetType()).Error("insert(). " + ex.Message, ex); throw; } }
public int delete(FechaDePagoEntity fecha) { MyLog4Net.Instance.getCustomLog(this.GetType()).Info("Eliminado id: " + fecha.FechaDePago); StringBuilder sql = new StringBuilder(); sql.Append("DELETE"); sql.Append(" FROM "); sql.Append(this.tabla); sql.Append(" WHERE "); sql.Append(" idLiquidacion = "); sql.Append(fecha.IdLiquidacion); sql.Append(" and fechaDePago = '"); sql.Append(fecha.FechaDePago + "'"); try { return Model.DB.ejecutarProceso(Model.TipoComando.Texto, sql.ToString()); } catch (Exception ex) { MyLog4Net.Instance.getCustomLog(this.GetType()).Error("delete(). " + ex.Message, ex); throw; } }
public int delete(FechaDePagoEntity fecha) { MyLog4Net.Instance.getCustomLog(this.GetType()).Info("Eliminado id: " + fecha.FechaDePago); StringBuilder sql = new StringBuilder(); sql.Append("DELETE"); sql.Append(" FROM "); sql.Append(this.tabla); sql.Append(" WHERE "); sql.Append(" idLiquidacion = "); sql.Append(fecha.IdLiquidacion); sql.Append(" and fechaDePago = '"); sql.Append(fecha.FechaDePago + "'"); try { return(Model.DB.ejecutarProceso(Model.TipoComando.Texto, sql.ToString())); } catch (Exception ex) { MyLog4Net.Instance.getCustomLog(this.GetType()).Error("delete(). " + ex.Message, ex); throw; } }
public int update(FechaDePagoEntity fecha) { MyLog4Net.Instance.getCustomLog(this.GetType()).Info("Actualizando: " + fecha.FechaDePago); try { StringBuilder sql = new StringBuilder(); sql.Append(" UPDATE "); sql.Append(this.tabla); sql.Append(" SET"); sql.Append(" fechaDePago = '"); sql.Append(fecha.FechaDePago); sql.Append("'"); sql.Append(" WHERE "); sql.Append(" idLiquidacion = "); sql.Append(fecha.IdLiquidacion); return(Model.DB.ejecutarProceso(Model.TipoComando.Texto, sql.ToString())); } catch (Exception ex) { MyLog4Net.Instance.getCustomLog(this.GetType()).Error("update(). " + ex.Message, ex); throw; } }
private FechaDePagoEntity make(IDataReader reader) { FechaDePagoEntity fecha = new FechaDePagoEntity(int.Parse(reader["idLiquidacion"].ToString()), DateTime.Parse(reader["fechaDePago"].ToString())); return fecha; }
public int update(FechaDePagoEntity fecha) { MyLog4Net.Instance.getCustomLog(this.GetType()).Info("Actualizando: " + fecha.FechaDePago); try { StringBuilder sql = new StringBuilder(); sql.Append(" UPDATE "); sql.Append(this.tabla); sql.Append(" SET"); sql.Append(" fechaDePago = '"); sql.Append(fecha.FechaDePago); sql.Append("'"); sql.Append(" WHERE "); sql.Append(" idLiquidacion = "); sql.Append(fecha.IdLiquidacion); return Model.DB.ejecutarProceso(Model.TipoComando.Texto, sql.ToString()); } catch (Exception ex) { MyLog4Net.Instance.getCustomLog(this.GetType()).Error("update(). " + ex.Message, ex); throw; } }
public int insert(FechaDePagoEntity fecha) { MyLog4Net.Instance.getCustomLog(this.GetType()).Info("Agregando: " + fecha.FechaDePago); try { StringBuilder sql = new StringBuilder(); sql.Append(" INSERT INTO "); sql.Append(this.tabla); sql.Append(" VALUES("); sql.Append(fecha.IdLiquidacion); sql.Append(", '"); sql.Append(fecha.FechaDePago); sql.Append("')"); return Model.DB.ejecutarProceso(Model.TipoComando.Texto, sql.ToString()); } catch (Exception ex) { MyLog4Net.Instance.getCustomLog(this.GetType()).Error("insert(). " + ex.Message, ex); throw; } }
private FechaDePagoEntity make(IDataReader reader) { FechaDePagoEntity fecha = new FechaDePagoEntity(int.Parse(reader["idLiquidacion"].ToString()), DateTime.Parse(reader["fechaDePago"].ToString())); return(fecha); }