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) { } }
public void StartRegister(RegisterAccount form) { _account.startRegister(registerAccountBrowser, form); }