Example #1
0
        private void btnModificarItem_Click(object sender, EventArgs e)
        {
            try
            {
                if (grdItems.SelectedRows.Count == 1)
                {
                    DataGridViewRow row      = grdItems.SelectedRows[0];
                    int             id       = Int32.Parse(row.Cells[0].Value.ToString());
                    double          monto    = Double.Parse(row.Cells[3].Value.ToString());
                    int             cantidad = Int32.Parse(row.Cells[2].Value.ToString());
                    string          concepto = row.Cells[1].Value.ToString().Trim();
                    Form            modif    = new AbmFactura.ModificarItemFactura(this, id, monto, cantidad, concepto);
                    modif.Show();
                    this.Enabled = false;
                }
                else
                {
                    throw new Exception("Se debe seleccionar exactamente una fila");
                }
            }

            catch (Exception excepcion)
            {
                MessageBox.Show(excepcion.Message, "Error", MessageBoxButtons.OK);
            }
        }
Example #2
0
        //AL SELECCIONAR UN ITEM LE PASO EL NUMERO DE FACTURA Y LA DESCRIPCION PARA PODER MODIFICAR SUS DATOS
        private void button1_Click(object sender, EventArgs e)
        {
            Form formularioSiguiente = new AbmFactura.ModificarItemFactura(nroFactura, descripcion);

            this.Hide();
            formularioSiguiente.ShowDialog();
            this.Show();
        }