Example #1
0
        private void TBXFuncionario_KeyPress(object sender, KeyPressEventArgs e)
        {
            FRMPesquisa_Funcionario frmPesquisaFuncionario = new FRMPesquisa_Funcionario();

            frmPesquisaFuncionario.ShowDialog();

            EmployeeSelected    = frmPesquisaFuncionario.EmployeeSelected;
            TBXFuncionario.Text = EmployeeSelected.Name;
            Loan.EmployeeCode   = EmployeeSelected.EmployeeCode;
        }
Example #2
0
        private void BTNPesquisar_Click(object sender, EventArgs e)
        {
            FRMPesquisa_Funcionario frmPesquisa = new FRMPesquisa_Funcionario();

            frmPesquisa.ShowDialog();
            try
            {
                Employee = frmPesquisa.EmployeeSelected;
            }
            catch (NullReferenceException ex)
            {
                Employee = new Employee();
                Console.WriteLine(ex.StackTrace);
            }

            EmployeeToForm();
        }