예제 #1
0
        private void btnLogIn_Click(object sender, EventArgs e)
        {
            member = memberDAO.AuthenticateUser(txtUsername.Text, txtPassword.Text);
            MainForm main = new MainForm();
            if (member != null)
            {
                main.setMember(member);
                main.Show();

                this.Hide();
            }
        }
예제 #2
0
        private void btnRegister_Click(object sender, EventArgs e)
        {
            DateTime dateNow = DateTime.Now;

            member = new Member(txtUserName.Text, txtEmail.Text,long.Parse(txtPhone.Text),null, dateNow, false, dateNow);
            dao.InsertMember(member);

            if (image != null)
            {
                dao.UpdateMemberImage(image,member.Username);
            }
            MainForm main = new MainForm();
            main.setMember(member);
            main.Show();
            this.Hide();
        }
예제 #3
0
 private void btnLogout_Click(object sender, EventArgs e)
 {
     if (isLoggedIn == false)
     {
         //go to log out
         this.Close();
         MainForm frmMain = new MainForm();
         frmMain.Show();
     }
     else
     {
         //go to create account
     }
 }