Example #1
0
 private void btnCadFornecedor_Click(object sender, EventArgs e)
 {
     using (FrmNCM frm = new FrmNCM())
     {
         frm.ShowDialog();
     }
 }
Example #2
0
        private void DataGriewSearch_KeyDown(object sender, KeyEventArgs e)
        {
            if (NCMColl.Count > 0)
            {
                if (e.KeyCode == Keys.Enter)
                {
                    //Obter a linha da célula selecionada
                    DataGridViewRow linhaAtual = DataGriewSearch.CurrentRow;

                    //Exibir o índice da linha atual
                    int indice = linhaAtual.Index;
                    Result  = NCMColl[indice].CODNCM;
                    Result2 = NCMColl[indice].IDNCM;
                    this.Close();
                }
                else if ((Control.ModifierKeys == Keys.Control) &&
                         (e.KeyCode == Keys.D))
                {
                    using (FrmNCM Frm = new FrmNCM())
                    {
                        int linha = DataGriewSearch.CurrentRow.Index; //PEGA LINHA SELECIONADA
                        Frm.ShowDialog();
                    }
                }
            }
        }