Example #1
0
        private void StartGettingAccountAndCreate(object sender, EventArgs e)
        {
            if (Application.OpenForms.OfType <RegisterAccount>().Any())
            {
                return;
            }

            try
            {
                var registerModel = accountService.GetNewAccount();
                if (registerModel.Id == 0)
                {
                    return;
                }

                IRegisterAccount registerAccount = null;
                switch (registerModel.WebId.ToLower())
                {
                case Constant.BANHKEO:
                    registerAccount = new RegisterAccount_BKSite(registerModel);
                    break;

                case Constant.HANHLANG:
                    registerAccount = new RegisterAccount_HLCSite(registerModel);
                    break;

                case Constant.LANQUEPHUONG:
                    registerAccount = new RegisterAccount_LQSite(registerModel);
                    break;
                }

                RegisterAccount form = new RegisterAccount(registerAccount);
                form.Show(this);
                form.StartRegister(form);
            }
            catch (Exception)
            {
            }
        }
Example #2
0
 public RegisterAccount(IRegisterAccount account)
 {
     _account = account;
     InitializeComponent();
 }
Example #3
0
 public LoginController(IRegisterAccount reg, SignInManager <IdentityUser> signInManager, UserManager <IdentityUser> userManager)
 {
     _register          = reg;
     this.signInManager = signInManager;
     this.userManager   = userManager;
 }