示例#1
0
        private void DgvDetalleCompra_SelectionChanged(object sender, EventArgs e)
        {
            try
            {
                if (isPedido)
                {
                    cotPR           = new DCotizacionPR();
                    Dgv2.DataSource = cotPR.SelectCotizacionesPRByCodStockAndCodPR((int)DgvDetalleCompra.SelectedRows[0].Cells[0].Value
                                                                                   , (int)DgvPedidos.SelectedRows[0].Cells[0].Value);
                    Dgv2.Refresh();

                    PersonalizarGridCotizacion();
                }
                else
                {
                    cotSC           = new DCotizacionSC();
                    Dgv2.DataSource = cotSC.SelectCotizacionesSCByCodBienUsoAndCodSC((int)DgvDetalleCompra.SelectedRows[0].Cells[0].Value,
                                                                                     (int)DgvSolicitudes.SelectedRows[0].Cells[0].Value);
                    Dgv2.Refresh();
                }
            }
            catch (Exception ex)
            {
                //MessageBox.Show($"Error: {ex.Message}", "ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
        }
示例#2
0
        private void LimpiarGridsDetalles()
        {
            DgvDetalleCompra.DataSource = null;
            Dgv2.DataSource             = null;

            DgvDetalleCompra.Refresh();
            Dgv2.Refresh();
        }
示例#3
0
 private void Dgv2_CellEnter(object sender, DataGridViewCellEventArgs e)
 {
     if (WithOpen)
     {
         return;
     }
     if (Dgv2.Columns[e.ColumnIndex].Name == "volent")
     {
         Dgv2.BeginEdit(true);
     }
     else
     {
         Dgv2.EndEdit();
     }
 }
示例#4
0
        private void TableBrowser_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyData == Keys.Escape)
            {
                Close();
            }

            if (e.KeyCode == Keys.Menu && e.Modifiers == Keys.Alt)
            {
                if (Dgv.Focused)
                {
                    Dgv2.Focus();
                }
                else
                {
                    Dgv.Focus();
                }
                e.Handled = true;
            }
        }