public int update(FechaDePagoEntity fecha) { using (FechaDePagoData fechadepagoData = new FechaDePagoData()) { return fechadepagoData.update(fecha); } }
public int insert(FechaDePagoEntity fecha) { using (var fechadepagoData = new FechaDePagoData()) { return fechadepagoData.insert(fecha); } }
public List<FechaDePagoEntity> getAll(int idLiquidacion) { using (var fechadepagoData = new FechaDePagoData()) { List<FechaDePagoEntity> fechas = fechadepagoData.GetAll(idLiquidacion); return fechas; } }
public FechaDePagoEntity getById(int idLiquidacion, DateTime fechaDePago) { FechaDePagoEntity fecha; using (var fechadepagoData = new FechaDePagoData()) { fecha = fechadepagoData.getById(idLiquidacion, fechaDePago); } return fecha; }
public int deleteFechasDePago(List<FechaDePagoEntity> fechas) { int salida = 0; MyLog4Net.Instance.getCustomLog(this.GetType()).Info("Eliminando fechas de pago: " + fechas.ToString()); try { using (var fechadepagoData = new FechaDePagoData()) { foreach (FechaDePagoEntity f in fechas) fechadepagoData.delete(f); } return salida; } catch (Exception ex) { MyLog4Net.Instance.getCustomLog(this.GetType()).Error("delete(). fechas de pago" + ex.Message, ex); return -1; throw; } }
public int insertFechasDePago(List <FechaDePagoEntity> fechas) { int salida = 0; MyLog4Net.Instance.getCustomLog(this.GetType()).Info("Agregando fechas de pago: " + fechas.ToString()); try { using (var fechadepagoData = new FechaDePagoData()) { foreach (FechaDePagoEntity f in fechas) { fechadepagoData.insert(f); } } return(salida); } catch (Exception ex) { MyLog4Net.Instance.getCustomLog(this.GetType()).Error("insert(). fechas de pago" + ex.Message, ex); return(-1); throw; } }
public int deleteFechasDePago(int idLiquidacion) { int salida = 0; MyLog4Net.Instance.getCustomLog(this.GetType()).Info("Eliminando fechas de pago: " + idLiquidacion); try { using (var fechadepagoData = new FechaDePagoData()) fechadepagoData.delete(idLiquidacion); return salida; } catch (Exception ex) { MyLog4Net.Instance.getCustomLog(this.GetType()).Error("delete(). fechas de pago" + ex.Message, ex); return -1; throw; } }
private LiquidacionDetalleEntity make(IDataReader reader) { LiquidacionDetalleEntity liqdet = new LiquidacionDetalleEntity(int.Parse(reader["aniomes"].ToString()), int.Parse(reader["idAplicacion"].ToString()), DateTime.Parse(reader["fechaLiquidacion"].ToString())); liqdet.Id = int.Parse(reader["id"].ToString()); liqdet.IdTipoSalario = int.Parse(reader["idTipoSalario"].ToString()); liqdet.Descripcion = reader["descripcion"].ToString(); liqdet.PeriodoLiquidado = reader["periodoLiquidado"].ToString(); liqdet.LugarDePago = reader["lugarDePago"].ToString(); //liqdet.FechaDePago = reader["fechaDePago"] == DBNull.Value ? new DateTime(0) : DateTime.Parse(reader["fechaDePago"].ToString()); liqdet.PeriodoDepositado = reader["periodoDepositado"].ToString(); liqdet.BancoDepositado = reader["bancoDepositado"].ToString(); liqdet.FechaDepositado = reader["fechaDepositado"] == DBNull.Value ? new DateTime(0) : DateTime.Parse(reader["fechaDepositado"].ToString()); liqdet.Estado = Boolean.Parse(reader["Estado"].ToString()); liqdet.RecibosSeparados = Boolean.Parse(reader["recibosSeparados"].ToString()); liqdet.Eliminado = Boolean.Parse(reader["eliminado"].ToString()); //cargo fechas de pago using (var fechadepagoData = new FechaDePagoData()) { liqdet.FechasDePago = fechadepagoData.GetAll(liqdet.Id); } return liqdet; }