private void btnLogin_Click(object sender, EventArgs e) { LoginRequest request = null; LoginResponse response = null; request = new LoginRequest() { UserName = this.userName.Text, Password = this.password.Text }; try { realPropertyTaxProjectionManager = BusinessDelegateFactory.GetInstance().GetRealPropertyTaxProjectionService(); response = new LoginResponse(); response = realPropertyTaxProjectionManager.Login(request); if (response.IsLoginValid) { this.DialogResult = DialogResult.OK; } } catch (RealPropertyTaxProjectionException ex) { FormHelper.MessageShow(ex.Message); this.userName.Focus(); } catch (Exception ex) { FormHelper.MessageShow(ex.Message); this.userName.Focus(); } finally { realPropertyTaxProjectionManager = null; response = null; request = null; } }
public void Initialize() { realPropertyTaxProjectionManager = new RealPropertyTaxProjectionManager(); result = new Result(); }