Exemplo n.º 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();
            }
        }
Exemplo n.º 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();
        }