Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int IdCxC = 0;

            if (!IsPostBack)
            {
                DdIdCuenta.DataSource     = Cuentas.Lista("IdCuenta,Descripcion", "Cuentas");
                DdIdCuenta.DataTextField  = "Descripcion";
                DdIdCuenta.DataValueField = "IdCuenta";
                DdIdCuenta.DataBind();


                int.TryParse(Request.QueryString["IdCxC"], out IdCxC);

                if (cc.Buscar(IdCxC))
                {
                    TbIdCxC.Text             = cc.IdCxC.ToString();
                    DdIdCuenta.SelectedIndex = cc.IdCuenta;
                    TbFecha.Text             = cc.Fecha.ToString("yyyy-MM-dd");
                    TbValor.Text             = cc.Valor.ToString();
                    TbBalance.Text           = cc.Balance.ToString();
                    TbDescripcion.Text       = cc.Descripcion;

                    BtnGuardar.Text = "Actualizar";
                }

                if (DdIdCuenta.SelectedValue != "")
                {
                    if (c.Buscar(DdIdCuenta.SelectedValue) == true)
                    {
                        TbBalance.Text = c.Balance.ToString();
                    }
                }
            }
        }
Ejemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int IdP = 0; /// IdPago Detalle Sacado del QueryString

            int.TryParse(Request.QueryString["IdPago"], out IdP);
            if (!IsPostBack)
            {
                if (pag.Buscar(IdP))
                {
                    TbIdPago.Text            = pag.IdCobro.ToString();
                    DdIdCuenta.SelectedIndex = pag.IdCuenta;
                    TbFecha.Text             = pag.Fecha.ToString("yyyy-MM-dd");
                    TbValor.Text             = pag.Valor.ToString();
                    Buscar(IdP);
                    BtnGuardar.Text = "Actulizar";
                }

                DdIdCuenta.DataSource     = Cuentas.Lista("IdCuenta,Descripcion ", "Cuentas");
                DdIdCuenta.DataTextField  = "Descripcion";
                DdIdCuenta.DataValueField = "IdCuenta";
                DdIdCuenta.DataBind();

                DdIdCxP.DataSource     = CxP.Lista("Descripcion,IdCxP ", "CxP");
                DdIdCxP.DataTextField  = "Descripcion";
                DdIdCxP.DataValueField = "IdCxP";
                DdIdCxP.DataBind();
            }
        }
Ejemplo n.º 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int IdGasto = 0;

            if (!IsPostBack)
            {
                int.TryParse(Request.QueryString["IdGasto"], out IdGasto);

                if (gas.Buscar(IdGasto))
                {
                    TbIdGasto.Text              = Convert.ToString(IdGasto);
                    DdIdCuenta.SelectedIndex    = gas.IdCuenta;
                    DdIdCategoria.SelectedIndex = gas.IdCategoria;
                    TbFecha.Text       = gas.Fecha.ToString("yyyy-MM-dd");
                    TbValor.Text       = gas.Valor.ToString();
                    TbDescripcion.Text = gas.Descripcion;

                    BtnGuardar.Text = "Actualizar";
                }
                DdIdCategoria.DataSource     = Categorias.Lista("IdCategoria,Descripcion", "Categorias");
                DdIdCategoria.DataTextField  = "Descripcion";
                DdIdCategoria.DataValueField = "IdCategoria";
                DdIdCategoria.DataBind();

                DdIdCuenta.DataSource     = Cuentas.Lista("IdCuenta,Descripcion", "Cuentas");
                DdIdCuenta.DataTextField  = "Descripcion";
                DdIdCuenta.DataValueField = "IdCuenta";
                DdIdCuenta.DataBind();
            }
        }
Ejemplo n.º 4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int IdC = 0;// IdCobro De QueyString;

            if (!IsPostBack)
            {
                int.TryParse(Request.QueryString["IdCobro"], out IdC);
                if (Cob.Buscar(IdC))
                {
                    TbIdCobro.Text           = Cob.IdCobro.ToString();
                    DdIdCuenta.SelectedIndex = Cob.IdCuenta;
                    TbFecha.Text             = Cob.Fecha.ToString("yyyy-MM-dd");
                    TbValor.Text             = Cob.Valor.ToString();


                    BtnGuardar.Text = "Actulizar";
                    Buscar(IdC);
                }
            }
            DdIdCuenta.DataSource     = Cuentas.Lista("IdCuenta,Descripcion ", "Cuentas");
            DdIdCuenta.DataTextField  = "Descripcion";
            DdIdCuenta.DataValueField = "IdCuenta";
            DdIdCuenta.DataBind();

            DdIdCxC.DataSource     = CxC.Lista("Descripcion,IdCxC ", "CxC");
            DdIdCxC.DataTextField  = "Descripcion";
            DdIdCxC.DataValueField = "IdCxC";
            DdIdCxC.DataBind();
        }