public LoginServiceFixture()
            : base(ConfigReader.WebServiceEnum.LoginService)
        {
            RequiresBrowser = true;

            this.service = new LoginSoapClient(
                CurrentWebServiceConfig.EndpointConfigName,
                RemoteAddressUri.ToString());
        }
Ejemplo n.º 2
0
        private void btnLogin_Click(object sender, EventArgs e)
        {
            var sv       = new LoginSoapClient();
            var account  = txtAccount.Text;
            var password = txtPassword.Text;

            if (sv.CheckLogin(account, password) == true)
            {
                MessageBox.Show("Login successfully!");
                this.Hide();
                Main main = new Main(txtAccount.Text);
                main.Show();
            }
            else
            {
                MessageBox.Show("Account is falsed! "); txtAccount.Text = ""; txtPassword.Text = "";
            }
        }
        private void btnChange_Click(object sender, EventArgs e)
        {
            var sv   = new  LoginSoapClient();
            var user = sv.getUser(nameaccount);

            if (txtPassold.Text != user.Password)
            {
                MessageBox.Show("Old Password is false");
            }
            else if (txtPassnew.Text != txtConfirm.Text)
            {
                MessageBox.Show("New password is false");
            }
            else
            {
                if (sv.updatepass(nameaccount, txtPassnew.Text) == true)
                {
                    MessageBox.Show("Change password successfully");
                }
            }
        }