Esempio n. 1
0
        private void register_Click(object sender, System.EventArgs e)
        {
            var account = MapFromForm();

            if (account.Errors.Any())
            {
                MessageBoxHelper.ShowMessageBox(account.Errors.First().ErrorMesssage);
            }
            else
            {
                var response = _accountManagementService.Register(account);
                if (!string.IsNullOrEmpty(response.ErrorMesssage))
                {
                    MessageBoxHelper.ShowMessageBox(response.ErrorMesssage);
                }
                else
                {
                    MessageBoxHelper.ShowMessageBox(ResourceHelper.ResourceKey.RegisteredSuccessfully, true);
                    this.Close();
                }
            }
        }