Ejemplo n.º 1
0
 protected void PrepareGridAccounts()
 {
     if (this.activeControl.Visible)
     {
         PaginaBase page = this.Page as PaginaBase;
         this.gridAccounts.DataSource = ControladorShardAccount.GetAccounts(page.RecuperarLoginUsuarioLogado()).GetDataSet();
         this.gridAccounts.DataBind();
     }
 }
Ejemplo n.º 2
0
        protected void PrepareViewItems()
        {
            this.ddlAccount.DataSource     = ControladorShardAccount.GetAccounts(base.RecuperarLoginUsuarioLogado()).GetDataSet();
            this.ddlAccount.DataValueField = "IdUsuario";
            this.ddlAccount.DataTextField  = "Login";
            this.ddlAccount.DataBind();

            this.ddlAccount.Items.Insert(0, new ListItem("..:: No account to select ::..", "0"));
        }
Ejemplo n.º 3
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.º 4
0
 public bool Delete(string loginConta)
 {
     try
     {
         ColecaoPersistencia colecao = new ColecaoPersistencia();
         int id = ControladorShardAccount.GetAccount(loginConta).ID;
         ControladorShardAccount.Excluir(id, colecao);
         colecao.Persistir();
         return(true);
     }
     catch { return(false); /*Não foi possível remover a conta*/ }
 }
Ejemplo n.º 5
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); }
        }