Example #1
0
        private void LoadEmployee()
        {
            List <User> list = userPresenter.GetAllEmployee();

            if (list.Count == 0)
            {
                MessageBox.Show("This employee'name doesn't exist!");
            }
            else
            {
                txtUserID.ReadOnly         = true;
                dgvEmployeeList.DataSource = list;
                dgvEmployeeList.Columns.Remove("Password");
                txtUserID.Text   = "";
                txtUserName.Text = "";
                txtAddress.Text  = "";
                txtPhone.Text    = "";
                txtEmail.Text    = "";
                txtRoleID.Text   = "";
            }
        }