コード例 #1
0
        private void btnNuevo_Click(object sender, EventArgs e)
        {
            Detalle_Venta venta = new Detalle_Venta(cone);

            venta.btnNuevoD();
            venta.ShowDialog();
            ListaDVenta();
            ListaVenta();
        }
コード例 #2
0
        private void btnEliminar_Click(object sender, EventArgs e)
        {
            DataGridViewSelectedRowCollection rowCollection = dgvDetalleVenta.SelectedRows;

            if (rowCollection.Count == 0)
            {
                MessageBox.Show(this, "ERROR, debe seleccionar una fila de la tabla para poder Eliminar", "Mensaje de ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            DataGridViewRow gridRow = rowCollection[0];
            DataRow         drow    = ((DataRowView)gridRow.DataBoundItem).Row;

            Detalle_Venta venta = new Detalle_Venta(cone);

            venta.DrDetalleVenta = drow;
            venta.btnEliminarDP();
            venta.ShowDialog();
            ListaDVenta();
        }