Beispiel #1
0
 public int update(FechaDePagoEntity fecha)
 {
     using (FechaDePagoData fechadepagoData = new FechaDePagoData())
     {
         return fechadepagoData.update(fecha);
     }
 }
Beispiel #2
0
 public int delete(FechaDePagoEntity fecha)
 {
     using (FechaDePagoData fechadepagoData = new FechaDePagoData())
     {
         return(fechadepagoData.delete(fecha));
     }
 }
Beispiel #3
0
 public int insert(FechaDePagoEntity fecha)
 {
     using (var fechadepagoData = new FechaDePagoData())
     {
         return fechadepagoData.insert(fecha);
     }
 }
Beispiel #4
0
 public int insert(FechaDePagoEntity fecha)
 {
     using (var fechadepagoData = new FechaDePagoData())
     {
         return(fechadepagoData.insert(fecha));
     }
 }
Beispiel #5
0
 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;
     }
 }
Beispiel #6
0
 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;
     }
 }
Beispiel #7
0
        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;
            }
        }
Beispiel #8
0
 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;
     }
 }
Beispiel #9
0
 private FechaDePagoEntity make(IDataReader reader)
 {
     FechaDePagoEntity fecha = new FechaDePagoEntity(int.Parse(reader["idLiquidacion"].ToString()), DateTime.Parse(reader["fechaDePago"].ToString()));
     return fecha;
 }
Beispiel #10
0
 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;
     }
 }
Beispiel #11
0
 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;
     }
 }
Beispiel #12
0
        private FechaDePagoEntity make(IDataReader reader)
        {
            FechaDePagoEntity fecha = new FechaDePagoEntity(int.Parse(reader["idLiquidacion"].ToString()), DateTime.Parse(reader["fechaDePago"].ToString()));

            return(fecha);
        }