Exemplo n.º 1
0
        private void gvPedidos_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            string          id;
            ColeccionClases obCol;

            id    = Convert.ToString(gvPedidos.SelectedCells[0].Value);
            obCol = new ne_ventas().sel_by_idventa(id);
            foreach (Venta v in obCol)
            {
                lblCli.Text   = v.Cliente;
                lblFecha.Text = Convert.ToString(v.Fecha_emision);
                lblID.Text    = v.Id_venta;
                lblMeto.Text  = v.Met_pago;
                lblTot.Text   = Convert.ToString(v.Total);
            }
        }
        private void gvVentas_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            string          id;
            ColeccionClases obCol;

            id    = Convert.ToString(gvVentas.SelectedCells[0].Value);
            obCol = new ne_ventas().sel_by_idventa(id);
            Info_Venta iv = new Info_Venta();

            iv.Show();
            foreach (Venta v in obCol)
            {
                iv.txtCliente.Text  = v.Cliente;
                iv.txtID.Text       = v.Id_venta;
                iv.lblEstado.Text   = v.Estado;
                iv.dtFecha.Value    = v.Fecha_emision;
                iv.cmbPago.Text     = v.Met_pago;
                iv.txtVale.Text     = v.Vale;
                iv.txtVendedor.Text = v.Vendedor;
                return;
            }
        }