public bool ConsultarByNroLiquidacion() { DsLiquidacionEntidad ds = new DsLiquidacionEntidad(); SqlParameter pEntidadID = new SqlParameter("@EntidadID", this.EntidadID); SqlParameter pTipoEntidad = new SqlParameter("@TipoEntidadID", this.TipoEntidadComisionID); SqlParameter pNroLiquidacion = new SqlParameter("@NroLiquidacion", this.NroLiquidacion); Config.Conexion.LlenarTypeDataSet(ds.Datos, System.Data.CommandType.StoredProcedure, "LiquidacionEntidadONEByNroLiquidacion", pEntidadID, pTipoEntidad, pNroLiquidacion); if (ds.Datos.Rows.Count > 0) { DsLiquidacionEntidad.DatosRow dr = (DsLiquidacionEntidad.DatosRow)ds.Datos.Rows[0]; this.LiquidacionEntidadID = dr.LiquidacionEntidadID; this.TipoEntidadComisionID = dr.TipoEntidadComisionID; this.EntidadID = dr.EntidadID; this.NroLiquidacion = dr.NroLiquidacion; this.FechaDesde = dr.IsFechaDesdeNull()? Convert.ToDateTime("01/01/1900") :Convert.ToDateTime(dr.FechaDesde); this.Fecha = dr.Fecha; this.FechaHasta = dr.FechaHasta; PorcentajeIVA = dr.IsPorcentajeIVANull() ? 0 : dr.PorcentajeIVA; return(true); } else { return(false); } }
public void ConsultarByEntidadPeriodo() { DsLiquidacionEntidad ds = new DsLiquidacionEntidad(); SqlParameter pEntidadID = new SqlParameter("@EntidadID", this.EntidadID); SqlParameter pTipoEntidad = new SqlParameter("@TipoEntidadID", this.TipoEntidadComisionID); SqlParameter pFechaDesde = new SqlParameter("@FechaDesde", this.FechaDesde); SqlParameter pFechaHasta = new SqlParameter("@FechaHasta", this.FechaHasta); Config.Conexion.LlenarTypeDataSet(ds.Datos, System.Data.CommandType.StoredProcedure, "LiquidacionEntidadONEByEntidadPeriodo", pEntidadID, pTipoEntidad, pFechaDesde, pFechaHasta); if (ds.Datos.Rows.Count > 0) { DsLiquidacionEntidad.DatosRow dr = (DsLiquidacionEntidad.DatosRow)ds.Datos.Rows[0]; this.LiquidacionEntidadID = dr.LiquidacionEntidadID; this.TipoEntidadComisionID = dr.TipoEntidadComisionID; this.EntidadID = dr.EntidadID; this.NroLiquidacion = dr.NroLiquidacion; this.FechaDesde = dr.IsFechaDesdeNull()? Convert.ToDateTime("01/01/1900") :Convert.ToDateTime(dr.FechaDesde); this.Fecha = dr.Fecha; this.FechaHasta = dr.FechaHasta; PorcentajeIVA = dr.PorcentajeIVA; } }