예제 #1
0
        private void btnSignUp2_Click(object sender, EventArgs e)
        {
            Member obj = new Member
            {
                Username = txtUserName.Text,
                Password = txtPassWord.Text,
                Email    = txtEmail.Text
            };

            MemberRepository repository = new MemberRepository();

            string[] msg = { "Username exists", "Success" };

            int ret = repository.Add2(obj);

            MessageBox.Show(msg[ret]);
        }
예제 #2
0
        private void btnSignIn2_Click(object sender, EventArgs e)
        {
            MemberRepository repository = new MemberRepository();
            string           usr        = txtUserName.Text;
            string           pwd        = txtPassWord.Text;
            int ret;

            Member obj = repository.SignIn2(usr, pwd, out ret);

            if (obj != null)
            {
                MessageBox.Show("Sign in Success");
            }
            else
            {
                string[] msg = { "Username not exists.", "Input passwrod fail." };
                MessageBox.Show(msg[ret]);
            }
        }