示例#1
0
        public DsVentas GetVentasClientes(int orden, int categoriaUVentaID, int condicionPagoID, string periodoCredito, string categoriaCliente, bool esAgrupacion)
        {
            DsVentas ds = new DsVentas();

            SqlParameter pFechaDesde        = new SqlParameter("@FechaDesde", Utiles.BaseDatos.FechaToSql(this.FechaDesde));
            SqlParameter pFechaHasta        = new SqlParameter("@FechaHasta", Utiles.BaseDatos.FechaToSql(this.FechaHasta));
            SqlParameter pCantMeses         = new SqlParameter("@CantMeses", this.CantMeses);
            SqlParameter pClienteID         = new SqlParameter("@ClienteID", Utiles.BaseDatos.IntToSql(this.ClienteID));
            SqlParameter pOrden             = new SqlParameter("@Orden", orden);
            SqlParameter pUnidadVentaID     = new SqlParameter("@UnidadVentaID", Utiles.BaseDatos.IntToSql(this.UnidadVentaID));
            SqlParameter pVendedorID        = new SqlParameter("@VendedorID", Utiles.BaseDatos.IntToSql(this.VendedorID));
            SqlParameter pCategoriaUVentaID = new SqlParameter("@CategoriaUVentaID", Utiles.BaseDatos.IntToSql(categoriaUVentaID));
            SqlParameter pCondicionPagoID   = new SqlParameter("@CondicionPagoID", Utiles.BaseDatos.IntToSql(condicionPagoID));
            SqlParameter pPeriodoCredito    = new SqlParameter("@PeriodoCredito", periodoCredito);
            SqlParameter pCategoriaCliente  = new SqlParameter("@CategoriaCliente", categoriaCliente);
            SqlParameter pEsAgrupacion      = new SqlParameter("@EsAgrupacion", esAgrupacion);
            SqlParameter pValorDeclarado    = new SqlParameter("@ValorDeclarado", Utiles.Validaciones.obtieneEntero(ValorDeclarado));

            Config.Conexion.LlenarTypeDataSet(ds.Datos, System.Data.CommandType.StoredProcedure, "VentasPorCliente", pClienteID, pFechaDesde, pFechaHasta, pCantMeses, pOrden, pUnidadVentaID, pVendedorID, pCategoriaUVentaID, pCondicionPagoID, pPeriodoCredito, pCategoriaCliente, pEsAgrupacion, pValorDeclarado);

            /*DsVentas.DatosRow[] dr = null;
             * dr = (DsVentas.DatosRow[])ds.Datos.Select("", orden);
             *
             * DsVentas dsOrdenado = new DsVentas();
             * for(int i=0; i < ds.Datos.Count; i++)
             *      dsOrdenado.Datos.ImportRow(dr[i]);
             *
             * return dsOrdenado;*/
            return(ds);
        }
示例#2
0
        public DsVentas GetVentasAgencias(int orden, int categoriaUVentaID, int condicionPagoID)
        {
            DsVentas     ds                 = new DsVentas();
            SqlParameter pFechaDesde        = new SqlParameter("@FechaDesde", Utiles.BaseDatos.FechaToSql(this.FechaDesde));
            SqlParameter pFechaHasta        = new SqlParameter("@FechaHasta", Utiles.BaseDatos.FechaToSql(this.FechaHasta));
            SqlParameter pCantMeses         = new SqlParameter("@CantMeses", this.CantMeses);
            SqlParameter pAgenciaID         = new SqlParameter("@AgenciaID", Utiles.BaseDatos.IntToSql(this.AgenciaID));
            SqlParameter pZonaID            = new SqlParameter("@ZonaID", Utiles.BaseDatos.IntToSql(this.ZonaID));
            SqlParameter pOrden             = new SqlParameter("@Orden", orden);
            SqlParameter pUnidadVentaID     = new SqlParameter("@UnidadVentaID", Utiles.BaseDatos.IntToSql(unidadVentaID));
            SqlParameter pCategoriaUVentaID = new SqlParameter("@CategoriaUVentaID", Utiles.BaseDatos.IntToSql(categoriaUVentaID));
            SqlParameter pCondicionPagoID   = new SqlParameter("@CondicionPagoID", Utiles.BaseDatos.IntToSql(condicionPagoID));
            SqlParameter pValorDeclarado    = new SqlParameter("@ValorDeclarado", Utiles.Validaciones.obtieneEntero(ValorDeclarado));

            //SqlParameter pUnidadNegocioID = new SqlParameter("@UnidadNegocioID", unidadNegocioID);
            Config.Conexion.LlenarTypeDataSet(ds.Datos, System.Data.CommandType.StoredProcedure, "VentasPorAgencia", pAgenciaID, pFechaDesde, pFechaHasta, pCantMeses, pOrden, pUnidadVentaID, pCategoriaUVentaID, pCondicionPagoID, pZonaID, pValorDeclarado);

            /*DsVentas.DatosRow[] dr = null;
             * dr = (DsVentas.DatosRow[])ds.Datos.Select("", orden);
             *
             * DsVentas dsOrdenado = new DsVentas();
             * for(int i=0; i < ds.Datos.Count; i++)
             *      dsOrdenado.Datos.ImportRow(dr[i]);*/
            return(ds);
        }
示例#3
0
        private void Inicializar()
        {
            meses = (Hashtable)Session["Meses"];

            dsVentasPorMes = (DsVentasPorMes)Session["DsVentasAgenciasPorMes"];
            dsVentas       = (DsVentas)Session["DsVentas"];

            mesesAmostrar = (bool[])Session["MesesAmostrar"];


            Title = "Ranking de Ventas de Agencias - " + DateTime.Today.ToString("dd/MM/yyyy");
            Datos = dsVentas.Tables[0];

            CustomExport();
        }
        private void Inicializar()
        {
            meses = (Hashtable)Session["Meses"];

            dsVentasPorMes = (DsVentasPorMes)Session["DsVentasAgenciasPorMes"];
            dsVentas       = (DsVentas)Session["DsVentas"];

            mesesAmostrar = (bool[])Session["MesesAmostrar"];

            /*
             * Head = new string[ds.Datos.Columns.Count];
             * Col = new string[ds.Datos.Columns.Count];
             */
            /*		Head = new string[17]; //ds.Datos.Columns.Count
             *              Col = new string[17];//ds.Datos.Columns.Count
             *
             *              bool[] mesesAmostrar = (bool[])Session["MesesAmostrar"];
             *
             *              Head[0] = "Numerador";
             *              Col[0] = "Numerador";
             *
             *              Head[1] = "Nombre";
             *              Col[1] = "Nombre";
             *
             *              int j = 2;
             *              for (int i=0; i<mesesAmostrar.Length; i++)
             *              {
             *                      if (mesesAmostrar[i])
             *                      {
             *                              Head[j] = meses[i].ToString() + "<br>Flete Neto / Flete Bruto";
             *                              Col[j] = meses[i].ToString() + "<br>Flete Neto / Flete Bruto";
             *                              j++;
             *                      }
             *              }
             *              //int i = 0;
             *              /*for(int i=1; i < ds.Datos.Columns.Count;i++)
             *              {
             *                      Head[i] = ds.Datos.Columns[i].ColumnName;
             *                      Col[i] = ds.Datos.Columns[i].ColumnName;
             *              }*/


            Title = "Ranking de Ventas de Agencias - " + DateTime.Today.ToString("dd/MM/yyyy");
            Datos = dsVentas.Tables[0];

            CustomExport();
        }
示例#5
0
        public DsVentas GetVentasAgenciasPorcentaje(int orden, int categoriaUVentaID, int condicionPagoID)
        {
            DsVentas     ds                 = new DsVentas();
            SqlParameter pFechaDesde        = new SqlParameter("@FechaDesde", Utiles.BaseDatos.FechaToSql(this.FechaDesde));
            SqlParameter pFechaHasta        = new SqlParameter("@FechaHasta", Utiles.BaseDatos.FechaToSql(this.FechaHasta));
            SqlParameter pCantMeses         = new SqlParameter("@CantMeses", this.CantMeses);
            SqlParameter pAgenciaID         = new SqlParameter("@AgenciaID", Utiles.BaseDatos.IntToSql(this.AgenciaID));
            SqlParameter pZonaID            = new SqlParameter("@ZonaID", Utiles.BaseDatos.IntToSql(this.ZonaID));
            SqlParameter pOrden             = new SqlParameter("@Orden", orden);
            SqlParameter pUnidadVentaID     = new SqlParameter("@UnidadVentaID", Utiles.BaseDatos.IntToSql(unidadVentaID));
            SqlParameter pCategoriaUVentaID = new SqlParameter("@CategoriaUVentaID", Utiles.BaseDatos.IntToSql(categoriaUVentaID));
            SqlParameter pCondicionPagoID   = new SqlParameter("@CondicionPagoID", Utiles.BaseDatos.IntToSql(condicionPagoID));
            SqlParameter pValorDeclarado    = new SqlParameter("@ValorDeclarado", Utiles.Validaciones.obtieneEntero(ValorDeclarado));

            //SqlParameter pUnidadNegocioID = new SqlParameter("@UnidadNegocioID", unidadNegocioID);
            Config.Conexion.LlenarTypeDataSet(ds.Datos, System.Data.CommandType.StoredProcedure, "VentasPorAgenciasEmision2611", pAgenciaID, pFechaDesde, pFechaHasta, pCantMeses, pOrden, pUnidadVentaID, pCategoriaUVentaID, pCondicionPagoID, pZonaID, pValorDeclarado);

            return(ds);
        }