Exemple #1
0
        private void dgvProducto_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            foreach (DataGridViewRow row in dgvProducto.SelectedRows)
            {
                string codigo    = this.dgvProducto.CurrentRow.Cells[0].Value.ToString();
                string idp       = this.dgvProducto.CurrentRow.Cells[1].Value.ToString();
                string nombre    = this.dgvProducto.CurrentRow.Cells[2].Value.ToString();
                string iva       = this.dgvProducto.CurrentRow.Cells[6].Value.ToString();
                string precio    = this.dgvProducto.CurrentRow.Cells[5].Value.ToString();
                string proveedor = this.dgvProducto.CurrentRow.Cells[7].Value.ToString();

                frmPedido ped = new frmPedido();

                foreach (Form frm in Application.OpenForms)
                {
                    if (frm.Name == "frmPedido")
                    {
                        ped = (frmPedido)frm;
                        ped.dgvProductoEntrada.Rows.Add(idp, codigo, nombre, proveedor, precio, iva);
                        this.Close();
                        break;
                    }
                }
            }
        }
Exemple #2
0
        private void dgvPedidos_DoubleClick(object sender, EventArgs e)
        {
            foreach (DataGridViewRow row in dgvPedidos.SelectedRows)
            {
                string folio    = this.dgvPedidos.CurrentRow.Cells["FOLIO"].Value.ToString();
                string subtotal = this.dgvPedidos.CurrentRow.Cells["SUBTOTAL"].Value.ToString();
                string ivatotal = this.dgvPedidos.CurrentRow.Cells["IVA_TOTAL"].Value.ToString();
                string total    = this.dgvPedidos.CurrentRow.Cells["TOTAL_PEDIDO"].Value.ToString();


                c.ExtraePedido(pedido.dgvProductoEntrada, folio);


                foreach (Form frm in Application.OpenForms)
                {
                    if (frm.Name == "frmPedido")
                    {
                        pedido = (frmPedido)frm;

                        pedido.txtTotalPedido.Text = this.dgvPedidos.CurrentRow.Cells["TOTAL_PEDIDO"].Value.ToString();
                        pedido.txtsubtotal.Text    = this.dgvPedidos.CurrentRow.Cells["SUBTOTAL"].Value.ToString();
                        pedido.txtIva.Text         = this.dgvPedidos.CurrentRow.Cells["IVA_TOTAL"].Value.ToString();
                        this.Close();
                        break;
                    }
                }
            }
        }
Exemple #3
0
        private void dgvPedidos_DoubleClick(object sender, EventArgs e)
        {
            foreach (DataGridViewRow row in dgvPedidos.SelectedRows)
            {
                string codigo    = this.dgvPedidos.CurrentRow.Cells["CODIGO"].Value.ToString();
                string nombre    = this.dgvPedidos.CurrentRow.Cells["DESCRIPCIÓN"].Value.ToString();
                string proveedor = this.dgvPedidos.CurrentRow.Cells["PROVEEDOR"].Value.ToString();
                string precio    = this.dgvPedidos.CurrentRow.Cells["PRECIO"].Value.ToString();
                string ivaprod   = this.dgvPedidos.CurrentRow.Cells["IVA"].Value.ToString();
                string pzapedir  = this.dgvPedidos.CurrentRow.Cells["PZAPEDIR"].Value.ToString();
                string total     = this.dgvPedidos.CurrentRow.Cells["TOTAL"].Value.ToString();


                frmPedido pedido = new frmPedido();


                foreach (Form frm in Application.OpenForms)
                {
                    if (frm.Name == "frmPedido")
                    {
                        pedido = (frmPedido)frm;

                        pedido.txtsubtotal.Text    = this.dgvPedidos.CurrentRow.Cells["SUBTOTAL"].Value.ToString();
                        pedido.txtTotalPedido.Text = this.dgvPedidos.CurrentRow.Cells["TOTAL"].Value.ToString();
                        pedido.txtIva.Text         = this.dgvPedidos.CurrentRow.Cells[5].Value.ToString();
                        //MessageBox.Show(codigo);
                        //MessageBox.Show(nombre);
                        //MessageBox.Show(proveedor);
                        //MessageBox.Show(precio);
                        //MessageBox.Show(ivaprod);
                        //MessageBox.Show(pzapedir);
                        //MessageBox.Show(total);
                        pedido.dgvProductoEntrada.Rows.Add(codigo, nombre, proveedor, precio, ivaprod, pzapedir, total);
                        this.Close();
                        break;
                    }
                }
            }
        }