示例#1
0
        public AdminUpdateProfile(AdminHome ah)
        {
            InitializeComponent();

            this.ah = ah;

            textBox16.Text = ah.a.Name;
            textBox15.Text = ah.a.DOB;
            textBox14.Text = ah.a.Gender;
            textBox13.Text = ah.a.Email;
            textBox12.Text = ah.a.ContactNo;
            textBox11.Text = ah.a.Username;
            textBox10.Text = ah.a.Password;
        }
示例#2
0
        private void LoginBtnClicked(object sender, EventArgs e)
        {
            Admin a = new Admin();

            a.Username = this.idTBox.Text;
            a.Password = this.passTBox.Text;

            AdminRepository ar = new AdminRepository();

            if (ar.AdminLoginVerification(a))
            {
                AdminHome ah = new AdminHome(a);
                ah.Show();
                this.Hide();
            }
            else
            {
                MessageBox.Show("Invalid ID or Password", "Login Failed");
            }
        }