// Sobreescribimos el metodo de busqueda y devolvemos la listaEntidades a mostrar. public override ListaEntidades realizarBusqueda(ref string p_strEmpresa, ref string p_strPrograma, ref string p_strTituloSolapa, ref string p_strTituloGrid, ref string p_strTituloPrint, ref string p_strDetalle, ref string p_strXlsName, ref string p_strMSort, ref string p_strMSortText, ref string p_strMCCut, ref Report.GraphicModes p_gmConfig, ref object[] p_aoExtraData) { // Validamos if (neAnio.Numero < 1980) { ControlReporte.cancelarBusqueda("Ingrese un año valido para realizar la busqueda"); } string l_strCodMarcaIni = "", l_strCodMarcaFin = ""; // Logica de los limites de busqueda if (cdcMarcas.SelectedStrCode.Trim() == "") { l_strCodMarcaIni = " "; l_strCodMarcaFin = "zz"; } else { l_strCodMarcaIni = l_strCodMarcaFin = cdcMarcas.SelectedStrCode; } ListaEntidades l_lentRet; // Disparamos la busqueda l_lentRet = Bll.Clientes.ClvZVentasPorMes(neAnio.Numero, l_strCodMarcaIni, l_strCodMarcaFin, m_smResult); if (MsgRuts.AnalizeError(this, m_smResult)) { return(null); } // Cargamos las strings necesarias p_strTituloSolapa = "Listado de Ventas por Mes"; p_strDetalle = String.Format("Listados de Ventas por Mes en el Año: {0}, para la empresa: {1}.", neAnio.Numero, cdcMarcas.SelectedItem.ToString()); l_lentRet.ChangeCaption("Mes", "V2MesCN1X"); l_lentRet.ChangeCaption("CantidadClientes", "V1Cantidad ClientesNS2"); l_lentRet.ChangeCaption("AbonosClientes", "V2Abonos Clientes2S20"); p_gmConfig = Report.GraphicModes.PivotInv; p_strEmpresa = PrgRuts.getEmpresa(); return(l_lentRet); }
public override ListaEntidades realizarBusqueda(ref string p_strEmpresa, ref string p_strPrograma, ref string p_strTituloSolapa, ref string p_strTituloGrid, ref string p_strTituloPrint, ref string p_strDetalle, ref string p_strXlsName, ref string p_strMSort, ref string p_strMSortText, ref string p_strMCCut, ref Report.GraphicModes p_gmConfig, ref object[] p_aoExtraData) { // Cargamos los valores por referencia para luego cargar el reporte. p_strDetalle = "Abonos para el mes: " + neMes.Numero.ToString() + " para la Marca: " + cdcMarcas.SelectedItem.ToString(); // Validamos las fechas if (!neMes.IsValid || !neAnio.IsValid) { MsgRuts.ShowMsg(this, "Es obligatorio definir un año y mes para el pedido del reporte"); return(null); } string l_strCodMarcaIni, l_strCodMarcaFin; if (neMes.Numero > 12) { MsgRuts.ShowMsg(this, "No existen mas de 12 meses!"); return(null); } // Logica de los limites de busqueda if (cdcMarcas.SelectedStrCode.Trim() == "") { l_strCodMarcaIni = " 0"; l_strCodMarcaFin = "zz"; } else { l_strCodMarcaIni = l_strCodMarcaFin = cdcMarcas.SelectedStrCode; } ListaEntidades l_leDetalleVentas = null; l_leDetalleVentas = Bll.Clientes.ClvZDetalleVentas(neAnio.Numero, neMes.Numero, l_strCodMarcaIni, l_strCodMarcaFin, m_smResult); if (MsgRuts.AnalizeError(this, m_smResult)) { return(null); } //Cambiamos los captions l_leDetalleVentas.ChangeCaption(ECliVenta.NumclienteCmp, "V1Número ClienteNN2"); l_leDetalleVentas.ChangeCaption(ECliente.RsocialCmp, "V1Razón SocialCN1"); l_leDetalleVentas.ChangeCaption(ECliVenta.FechaCmp, "V1FechaFN1"); l_leDetalleVentas.ChangeCaption("vendedor", "V1VendedorCN1"); l_leDetalleVentas.ChangeCaption(ECliVenta.AbonoCmp, "V1Abono2N1"); return(l_leDetalleVentas); }