示例#1
0
        protected void llenarComboBoxDeBancos()
        {
            LogicaBanco bancos = new LogicaBanco();

            this.comboBoxBanco.DataSource = bancos.EnlistaBancos();
            this.comboBoxBanco.DataBind();
        }
示例#2
0
        protected void defaultButton_Click(object sender, EventArgs e)
        {
            switch (seleccionRadioButton)
            {
            case 1:
                //El codigo para llenar el datagrid con la consulta por bancos
                LogicaBanco nombreBancos = new LogicaBanco();
                this.GridViewConsultarBanco.DataSource = null;
                this.GridViewConsultarBanco.DataSource = nombreBancos.llenarDataGridBancos(comboBoxBanco.SelectedItem.ToString());
                this.GridViewConsultarBanco.DataBind();
                this.GridViewConsultarBanco.Visible = true;
                break;

            case 2:
                //El codigo para llenar el datagrid con la consulta por numero de cuentas
                this.GridViewConsultarBanco.DataSource = null;
                LogicaBanco nombreTipoCuenta = new LogicaBanco();
                this.GridViewConsultarBanco.DataSource = nombreTipoCuenta.llenarDataGridTipoCuenta(DropDownListTipoCuenta.SelectedItem.ToString());
                this.GridViewConsultarBanco.DataBind();
                this.GridViewConsultarBanco.Visible = true;
                break;

            case 3:
                //El codigo para llenar el datagrid con toda la info de la bd de las cuentas
                LogicaBanco infoBanco = new LogicaBanco();
                this.GridViewConsultarBanco.DataSource = null;
                this.GridViewConsultarBanco.DataSource = infoBanco.llenarDataGridInfoCuentas();
                this.GridViewConsultarBanco.DataBind();
                this.GridViewConsultarBanco.Visible = true;
                break;
            }
        }
示例#3
0
        protected void llenarComboBoxDeTipoCuentas()
        {
            LogicaBanco tiposDeCuentas = new LogicaBanco();

            this.DropDownListTipoCuenta.DataSource = tiposDeCuentas.EnlistaTipoCuenta();
            this.DropDownListTipoCuenta.DataBind();
        }
示例#4
0
        protected void llenarComboBoxDeBancos()
        {
            LogicaBanco bancos = new LogicaBanco();

            this.DropDownListBancos.DataSource = bancos.EnlistaBancos();
            this.DropDownListBancos.DataBind();
            this.DropDownListBancos.Items.Add("Otro");
        }
示例#5
0
        protected void defaultButton_Click(object sender, EventArgs e)
        {
            if (TextBoxNuevoBanco.Visible == true)
            {
                string nombreBanco  = TextBoxNuevoBanco.Text.ToString();
                string numeroCuenta = TextBoxNumCuenta.Text.ToString();
                string tipoCuenta   = DropDownListTipoCuenta.SelectedItem.ToString();

                LogicaBanco agregacionBanco = new LogicaBanco();
                Boolean     Flag            = agregacionBanco.agregarBanco(nombreBanco, numeroCuenta, tipoCuenta, 1);

                if (Flag != false)
                {
                    Exito.Visible = true;
                    llenarComboBoxDeBancos();
                }
                else
                {
                    falla.Visible = true;
                }
            }
            else
            {
                string nombreBanco  = DropDownListBancos.SelectedItem.ToString();
                string numeroCuenta = TextBoxNumCuenta.Text.ToString();
                string tipoCuenta   = DropDownListTipoCuenta.SelectedItem.ToString();

                LogicaBanco agregacionBanco = new LogicaBanco();
                Boolean     Flag            = agregacionBanco.agregarBanco(nombreBanco, numeroCuenta, tipoCuenta, 2);

                if (Flag != false)
                {
                    Exito.Visible = true;
                    llenarComboBoxDeBancos();
                }
                else
                {
                    falla.Visible = true;
                }
            }
        }