Esempio n. 1
0
        private void nuevaLetraToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmGestionLetra form = new frmGestionLetra();

            form.Proceso = 1;
            form.ShowDialog();
            CargaLista();
        }
Esempio n. 2
0
        private void modificarLetraToolStripMenuItem_Click(object sender, EventArgs e)
        {
            DataGridViewRow Row = dgvPagos.SelectedRows[0];

            let.CodLetra = Convert.ToInt32(Row.Cells[codnota.Name].Value);
            frmGestionLetra form = new frmGestionLetra();

            form.letra   = let;
            form.Proceso = 2;
            form.ShowDialog();
            CargaLista();
        }
Esempio n. 3
0
 private void dgvProveedor_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     if (Procede == 1)
     {
         frmNotaIngreso form = (frmNotaIngreso)Application.OpenForms["frmNotaIngreso"];
         form.CodProveedor       = pro.CodProveedor;
         form.txtCodProv.Text    = pro.Ruc;
         form.txtNombreProv.Text = pro.RazonSocial;
         this.Close();
     }
     else if (Procede == 2)
     {
         frmGestionLetra form = (frmGestionLetra)Application.OpenForms["frmGestionLetra"];
         form.CodProveedor = pro.CodProveedor;
         this.Close();
     }
 }
Esempio n. 4
0
 private void dgvProveedor_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Return)
     {
         if (dgvProveedor.SelectedRows.Count > 0)
         {
             if (Procede == 1)
             {
                 frmNotaIngreso form = (frmNotaIngreso)Application.OpenForms["frmNotaIngreso"];
                 form.CodProveedor       = pro.CodProveedor;
                 form.txtCodProv.Text    = pro.Ruc;
                 form.txtNombreProv.Text = pro.RazonSocial;
                 this.Close();
             }
             else if (Procede == 2)
             {
                 frmGestionLetra form = (frmGestionLetra)Application.OpenForms["frmGestionLetra"];
                 form.CodProveedor = pro.CodProveedor;
                 this.Close();
             }
         }
     }
 }
Esempio n. 5
0
        private void dgvProveedor_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                try
                {
                    if (dgvProveedor.Rows.Count > 0)
                    {
                        int f = dgvProveedor.CurrentRow.Index;
                        pro.CodProveedor = Convert.ToInt32(dgvProveedor.Rows[f].Cells[codigo.Name].Value);
                        pro.Ruc          = dgvProveedor.Rows[f].Cells[ruc.Name].Value.ToString();
                        pro.RazonSocial  = dgvProveedor.Rows[f].Cells[razonsocial.Name].Value.ToString();
                    }
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
                if (Proceso == 3)
                {
                    btnAceptar.Enabled = true;
                }
            }


            if (e.KeyCode == Keys.Return)
            {
                if (dgvProveedor.SelectedRows.Count > 0)
                {
                    if (Procede == 1)
                    {
                        frmNotaIngresoPorOrden form = (frmNotaIngresoPorOrden)Application.OpenForms["frmNotaIngresoPorOrden"];
                        form.CodProveedor       = pro.CodProveedor;
                        form.txtCodProv.Text    = pro.Ruc;
                        form.txtNombreProv.Text = pro.RazonSocial;
                        this.Close();
                    }
                    else if (Procede == 2)
                    {
                        frmGestionLetra form = (frmGestionLetra)Application.OpenForms["frmGestionLetra"];
                        form.CodProveedor = pro.CodProveedor;
                        this.Close();
                    }
                    else if (Procede == 3)
                    {
                        frmOrdenCompra form = (frmOrdenCompra)Application.OpenForms["frmOrdenCompra"];
                        form.CodProveedor       = pro.CodProveedor;
                        form.txtCodProv.Text    = pro.Ruc;
                        form.txtNombreProv.Text = pro.RazonSocial;
                        this.Close();
                    }
                    if (Procede == 4)
                    {
                        frmNotaIngreso form = (frmNotaIngreso)Application.OpenForms["frmNotaIngreso"];
                        form.CodProveedor       = pro.CodProveedor;
                        form.txtCodProv.Text    = pro.Ruc;
                        form.txtNombreProv.Text = pro.RazonSocial;
                        this.Close();
                    }
                }
            }
        }
Esempio n. 6
0
        private void btnAceptar_Click(object sender, EventArgs e)
        {
            if (dgvProveedor.SelectedRows.Count > 0)
            {
                if (Procede == 1)
                {
                    frmNotaIngresoPorOrden form = (frmNotaIngresoPorOrden)Application.OpenForms["frmNotaIngresoPorOrden"];
                    form.CodProveedor         = pro.CodProveedor;
                    form.txtCodProv.Text      = pro.Ruc;
                    form.txtNombreProv.Text   = pro.RazonSocial;
                    form.txtCodProveedor.Text = pro.CodProveedor.ToString();
                    this.Close();
                }
                else if (Procede == 2)
                {
                    frmGestionLetra form = (frmGestionLetra)Application.OpenForms["frmGestionLetra"];
                    form.CodProveedor = pro.CodProveedor;
                    this.Close();
                }
                else if (Procede == 3)
                {
                    frmOrdenCompra form = (frmOrdenCompra)Application.OpenForms["frmOrdenCompra"];
                    form.CodProveedor       = pro.CodProveedor;
                    form.txtCodProv.Text    = pro.Ruc;
                    form.txtNombreProv.Text = pro.RazonSocial;
                    this.Close();
                }
                if (Procede == 4)
                {
                    frmNotaIngreso form = (frmNotaIngreso)Application.OpenForms["frmNotaIngreso"];
                    form.CodProveedor       = pro.CodProveedor;
                    form.txtCodProv.Text    = pro.Ruc;
                    form.txtNombreProv.Text = pro.RazonSocial;
                    this.Close();
                }
                if (Procede == 5)
                {
                    frmListaPreciosProductos form = (frmListaPreciosProductos)Application.OpenForms["frmListaPreciosProductos"];
                    if (pro.RazonSocial == null)
                    {
                        form.txtProveedorNomb.Focus();
                    }
                    else
                    {
                        form.txtProveedorCod.Text  = pro.CodProveedor.ToString();
                        form.txtProveedorNomb.Text = pro.RazonSocial;
                    }
                    this.Close();
                }

                //NOTA DE CREDITO POR COMPRA
                //MODIFICADO ALEX 23/02/2015
                else if (Procede == 6)
                {
                    frmNotadeCreditoCompra form = (frmNotadeCreditoCompra)Application.OpenForms["frmNotadeCreditoCompra"];
                    form.CodProveedor            = pro.CodProveedor;
                    form.txtCodProveedor.Text    = pro.Ruc;
                    form.txtNombreProveedor.Text = pro.RazonSocial;
                    this.Close();
                }
                //NOTA DE DEBITO POR COMPRA
                //MODIFICADO ALEX 04/03/2015
                else if (Procede == 7)
                {
                    frmNotadeDebitoCompra form = (frmNotadeDebitoCompra)Application.OpenForms["frmNotadeDebitoCompra"];
                    form.CodProveedor            = pro.CodProveedor;
                    form.txtCodProveedor.Text    = pro.Ruc;
                    form.txtNombreProveedor.Text = pro.RazonSocial;
                    this.Close();
                }
                else if (Procede == 8) //Salida por Devolucion
                {
                    frmNotaSalida form = (frmNotaSalida)Application.OpenForms["frmNotaSalida"];
                    form.CodProveedor          = pro.CodProveedor;
                    form.txtCodCliente.Text    = pro.Ruc;
                    form.txtNombreCliente.Text = pro.RazonSocial;
                    form.btnDetalle.Enabled    = true;
                    this.Close();
                }
                else if (Procede == 9) //Cambio de Proveedor
                {
                    frmCambioProveedor form = (frmCambioProveedor)Application.OpenForms["frmCambioProveedor"];
                    form.CodProv          = pro.CodProveedor;
                    form.txtCodProv2.Text = form.CodProv.ToString();
                    this.Close();
                }
            }
        }