Beispiel #1
0
 public void Limpiar()
 {
     TbIdPresupuesto.Text        = "";
     TbIdPresupuestoDetalle.Text = "";
     TbValor.Text             = "";
     TbDescripcion.Text       = "";
     VistaGridView.DataSource = null;
     VistaGridView.DataBind();
 }
Beispiel #2
0
 public void Limpiar()
 {
     TbIdPago.Text            = "";
     TbIdPagoDetalle.Text     = "";
     TbValorDetalle.Text      = "";
     TbValor.Text             = "";
     VistaGridView.DataSource = null;
     VistaGridView.DataBind();
 }
Beispiel #3
0
        protected void BtnAgregar_Click(object sender, EventArgs e)
        {
            if (Session["PagoDetalle"] != null)
            {
                pag = (PagosCxP)Session["PagoDetalle"];
            }
            pag.AgregarDetalle(Convert.ToInt32(DdIdCxP.SelectedValue), Convert.ToDouble(TbValorDetalle.Text));
            VistaGridView.DataSource = pag.pagoDetalle;
            VistaGridView.DataBind();

            Session["PagoDetalle"] = pag;
            LimpiarDetelle();
        }
Beispiel #4
0
        protected void BtnAgregar_Click(object sender, EventArgs e)
        {
            if (Session["PresupuestoDetalle"] != null)
            {
                pre = (Presupuesto)Session["PresupuestoDetalle"];
            }

            pre.AgregarDetalle(Convert.ToInt32(DdIdCategoria.SelectedValue), Convert.ToDouble(TbValor.Text));

            VistaGridView.DataSource = pre.presupuestoDetalle;
            VistaGridView.DataBind();

            Session["PresupuestoDetalle"] = pre;
            LimpiarDetalle();
        }
Beispiel #5
0
        protected void BtnAgregar_Click(object sender, EventArgs e)
        {
            if (Session["CobroDetalle"] != null)
            {
                Cob = (CobroCxC)Session["CobroDetalle"];
            }

            Cob.AgregarDetalle(Convert.ToInt32(DdIdCxC.SelectedValue), Convert.ToDouble(TbValorDetalle.Text));

            VistaGridView.DataSource = Cob.cobroDetalle;
            VistaGridView.DataBind();

            Session["CobroDetalle"] = Cob;

            LimpiarDetalle();
        }
Beispiel #6
0
        protected void BtnSiguiente_Click(object sender, EventArgs e)
        {
            if (TbIdPresupuesto.Text == string.Empty)
            {
                if (Session["CobroDetalle"] != null)
                {
                    pre = (Presupuesto)Session["PresupuestoDetalle"];
                }
                OtenerDatos();

                if (pre.Insertar())
                {
                    Alert("Presupuesto Se Guardo Corectamente");

                    VistaGridView.DataSource = null;
                    VistaGridView.DataBind();
                    Limpiar();
                }
                else
                {
                    Alert("Presupuesto No Se Pudo Guardar Corectamente ");
                }
            }
            else
            {
                OtenerDatos();
                Limpiar();
                if (pre.Modificar())
                {
                    Alert("Presupuesto Se Modificada Corectamente");
                }
                else
                {
                    Alert("Presupuesto No Se  Modificar Corectamente");
                }
            }
        }
Beispiel #7
0
 public void Buscar(int ID)
 {
     VistaGridView.DataSource = PresupuestoDetalles.Lista("*", "PresupuestoDetalles where IdPresupuesto =" + ID);
     VistaGridView.DataBind();
 }
Beispiel #8
0
 public void Buscar(int ID)
 {
     VistaGridView.DataSource = PagoDetalle.Lista("*", "PagoDetalle where IdPago =" + ID);
     VistaGridView.DataBind();
 }