Exemplo n.º 1
0
        private void CargarOpciones()
        {
            cFunciones fun = new cFunciones();
            DataTable  tb  = fun.CrearTabla("CodOpcion;Opcion");

            tb = fun.AgregarFilas(tb, "1;Comprador");
            tb = fun.AgregarFilas(tb, "2;Vendedor");
            fun.LlenarComboDatatable(cmbOpciones, tb, "Opcion", "CodOpcion");
        }
Exemplo n.º 2
0
        private void FrmCompra_Load(object sender, EventArgs e)
        {
            fun = new Clases.cFunciones();
            string Col = "CodArticulo;Nombre;Cantidad;Precio;Descuento;Subtotal";

            tbCompra = fun.CrearTabla(Col);
            LlenarComboArticulo();
            // (2x +4)/10 =4
        }
        private void Inicializar()
        {
            DateTime Fecha = DateTime.Now;

            txtFecha.Text = Fecha.ToShortDateString();
            fun           = new Clases.cFunciones();
            CargarTipoOperacion();
            string Col = "CodArticulo;Nombre;Precio;Cantidad;Subtotal;Indice;Libreria";

            tbVenta = fun.CrearTabla(Col);
            LlenarComboArticulo();
            Cargando = false;
        }
        private void FrmVentaJoya_Load(object sender, EventArgs e)
        {
            fun = new Clases.cFunciones();
            string Col = "CodRegistro;CodJoya;Codigo;Nombre;Cantidad;Precio;Comision;SubTotal";

            tbVenta = fun.CrearTabla(Col);
            DateTime Fecha = DateTime.Now;

            txtFecha.Text = Fecha.ToShortDateString();
            fun.EstiloBotones(btnGrabar);
            fun.EstiloBotones(btnCancelar);
            if (Principal.CodVenta != null)
            {
                BuscarVenta(Convert.ToInt32(Principal.CodVenta));
            }
        }
Exemplo n.º 5
0
        private void FrmEjecutarOrden_Load(object sender, EventArgs e)
        {
            fun = new cFunciones();
            DateTime fecha = DateTime.Now;

            txtFechaHasta.Text = fecha.ToShortDateString();
            fecha = fecha.AddMonths(-1);
            txtFechaDesde.Text           = fecha.ToShortDateString();
            lblAmarillo.BackColor        = System.Drawing.Color.Yellow;
            lblOrdenesConSaldo.BackColor = System.Drawing.Color.LightGreen;
            lblOrdenesSinSaldo.BackColor = System.Drawing.Color.LightGray;
            DataTable ttipo = fun.CrearTabla("Codigo;Nombre");

            ttipo = fun.AgregarFilas(ttipo, "1;Pre Ingresadas");
            ttipo = fun.AgregarFilas(ttipo, "2;Con Saldo");
            ttipo = fun.AgregarFilas(ttipo, "3;Sin Saldo");
            fun.LlenarComboDatatable(CmbTipo, ttipo, "Nombre", "Codigo");
            ValidarUsuario();
        }
Exemplo n.º 6
0
        public void Inicializar()
        {
            txtFechaAltaOrden.Text = DateTime.Now.ToShortDateString();
            fun.LlenarCombo(cmbTipoDoc, "TipoDocumento", "Nombre", "CodTipoDoc");
            fun.LlenarCombo(CmbTarjeta, "Tarjeta", "Nombre", "CodTarjeta");
            if (cmbTipoDoc.Items.Count > 0)
            {
                cmbTipoDoc.SelectedIndex = 1;
            }
            string Col = "CodArticulo;Nombre;Precio;Cantidad;Subtotal;Indice";

            tbVenta = fun.CrearTabla(Col);
            CargarTipoOperacion();
            lblTarjeta.Visible = false;
            lblCupon.Visible   = false;
            CmbTarjeta.Visible = false;
            txtCupon.Visible   = false;
            txt_CodigoBarra.Focus();
            txtDescuento.Visible = false;
            chkDescuento.Visible = false;
        }
        private void Inicializar()
        {
            fun = new Clases.cFunciones();
            fun.LlenarCombo(cmbProvincia, "Provincia", "Nombre", "CodProvincia");
            fun.LlenarCombo(cmbTipo, "Tipo", "Nombre", "CodTipo");
            string Col = "CodPresupuesto;CodJoya;Nombre;Tipo;Cantidad;Precio;SubTotal";

            tbDetalle = fun.CrearTabla(Col);
            fun.EstiloBotones(btnGrabar);
            txtFecha.Text = DateTime.Now.ToShortDateString();
            if (Principal.CodigoPrincipalAbm != null)
            {
                if (Principal.CodigoPrincipalAbm != null)
                {
                    Int32 CodPresupuesto = Convert.ToInt32(Principal.CodigoPrincipalAbm);
                    BuscarPresupuesto(CodPresupuesto);
                }
            }
            AgregaCodigoBarra  = false;
            AgregaCodigoBarra2 = false;
        }
Exemplo n.º 8
0
        private void FrmCompra_Load(object sender, EventArgs e)
        {
            fun = new Clases.cFunciones();
            string Col = "CodArticulo;Nombre;Cantidad;Precio;Descuento;Efectivo;Tarjeta;Subtotal;Libreria;PorEfe;PorTar;Indice";

            tbCompra = fun.CrearTabla(Col);

            DateTime Fecha = DateTime.Now;

            txtFecha.Text = Fecha.ToShortDateString();
            fun.LlenarCombo(cmbProveedor, "Proveedor", "Nombre", "CodProveedor");
            if (Principal.CodPrincipalCompra != null)
            {
                Int32 CodCompra = Convert.ToInt32(Principal.CodPrincipalCompra);
                BuscarCompraCompleta(CodCompra);
            }
            else
            {
                LlenarComboArticulo();
            }
            txtCodigo.Focus();
            CargarPorcentajesLibreria();
            Indice = 0;
        }
        public void Buscar(DateTime FechaDesde, DateTime FechaHasta)
        {
            string    Mes           = "";
            string    Anio          = "";
            int       NumeroMes     = 0;
            string    Total         = "";
            string    TotalComision = "";
            string    TotalRendido  = "";
            string    Val           = "";
            string    Col           = "Mes;Anio;Total;TotalComision;TotalRendido";
            DataTable tbResumen     = fun.CrearTabla(Col);
            cVenta    venta         = new Clases.cVenta();
            DataTable trdo          = venta.GetResumenVentas(FechaDesde, FechaHasta);

            if (trdo.Rows.Count > 0)
            {
                for (int i = 0; i < trdo.Rows.Count; i++)
                {
                    Val           = "";
                    NumeroMes     = Convert.ToInt32(trdo.Rows[i]["Mes"].ToString());
                    Mes           = Getmes(NumeroMes);
                    Anio          = trdo.Rows[i]["Anio"].ToString();
                    Total         = trdo.Rows[i]["Total"].ToString();
                    TotalComision = trdo.Rows[i]["TotalComision"].ToString();
                    TotalRendido  = trdo.Rows[i]["TotalRendido"].ToString();
                    Val           = Mes + ";" + Anio;
                    Val           = Val + ";" + Total + ";" + TotalComision + ";" + TotalRendido;
                    tbResumen     = fun.AgregarFilas(tbResumen, Val);
                }
            }
            if (tbResumen.Rows.Count > 0)
            {
                tbResumen = fun.TablaaMiles(tbResumen, "Total");
                tbResumen = fun.TablaaMiles(tbResumen, "TotalComision");
                tbResumen = fun.TablaaMiles(tbResumen, "TotalRendido");
            }
            Double dTotal         = fun.TotalizarColumna(tbResumen, "Total");
            Double dTotalComision = fun.TotalizarColumna(tbResumen, "TotalComision");
            Double dTotalRendido  = fun.TotalizarColumna(tbResumen, "TotalRendido");

            txtTotal.Text         = dTotal.ToString();
            txtTotalRendido.Text  = dTotalRendido.ToString();
            txtTotalComision.Text = dTotalComision.ToString();
            Grilla.DataSource     = tbResumen;
            if (txtTotal.Text != "")
            {
                txtTotal.Text = fun.FormatoEnteroMiles(txtTotal.Text);
            }
            if (txtTotalComision.Text != "")
            {
                txtTotalComision.Text = fun.FormatoEnteroMiles(txtTotalComision.Text);
            }
            if (txtTotalRendido.Text != "")
            {
                txtTotalRendido.Text = fun.FormatoEnteroMiles(txtTotalRendido.Text);
            }
            string ancho = "30;10;20;20;20";

            fun.AnchoColumnas(Grilla, ancho);
            Grilla.Columns[3].HeaderText = "Total Comisión";
            Grilla.Columns[4].HeaderText = "Total Rendido";
        }