Ejemplo n.º 1
0
 public bool Create(string loginUsuario, string loginConta, string senhaConta)
 {
     try
     {
         ColecaoPersistencia colecao = new ColecaoPersistencia();
         ControladorShardAccount.Manter(0, loginUsuario, loginConta, senhaConta, string.Empty, string.Empty, false, false, colecao);
         colecao.Persistir();
         return(true);
     }
     catch { return(false); /*Conta já existe*/ }
 }
Ejemplo n.º 2
0
        protected void btnRegister_Click(object sender, EventArgs e)
        {
            try
            {
                this.ValidateViewItems();
                if (this.Action == EnumActionShardAccount.NewAccount)
                {
                    ControladorShardAccount.Manter(int.MinValue, this.RecuperarLoginUsuarioLogado(), this.Login, this.Password, string.Empty, string.Empty, false, false, null);
                }
                else
                {
                    ControladorUsuarioConta.LinkingWebAccountToShardAccount(this.RecuperarLoginUsuarioLogado(), this.Login, this.Password);
                }

                this.ExibirMensagemAlerta("your account has been created/associated with success.");
                this.btnRegister.Enabled = false;
            }
            catch (Exception erro) { base.ExibirMensagemAlerta(erro.Message); }
        }