示例#1
0
        private void Login_Btn_Click(object sender, EventArgs e)
        {
            this.ValidateForm();

            var model = new LoginInputModel
            {
                Username = this._username,
                Password = this._password
            };

            if (!model.Validate())
            {
                return;
            }

            var loginSucceeded = this._usersService.Login(model);

            if (!loginSucceeded)
            {
                this.Error_Prov.SetError(this.Login_Btn, "Login failed.");
            }
            else
            {
                this.Dispose();
            }
        }