Ejemplo n.º 1
0
        private void btnLogin_Click(object sender, EventArgs e)
        {
            List <Employee> employees = DBConnection.getEmployee(Int32.Parse(txtEmployeeCode.Text));

            if (employees.Count() != 0)
            {
                foreach (var item in employees)
                {
                    Employee       employee = new Employee(item.EmployeeCode, item.FullName, item.Address);
                    AlterBooksForm bookForm = new AlterBooksForm(employee);
                    bookForm.Show();
                }
                this.Close();
            }
            else
            {
                MessageBox.Show("User name or password is wrong please try again");
            }
        }