Beispiel #1
0
        protected void BtnGuardar_Click(object sender, EventArgs e)
        {
            if (TbIdPago.Text == string.Empty)
            {
                if (Session["PagoDetalle"] != null)
                {
                    pag = (PagosCxP)Session["PagoDetalle"];
                }
                OtenerDatos();

                if (pag.Insertar())
                {
                    Alert("PagoCxP Se Guardo Corectamente");

                    Limpiar();
                }
                else
                {
                    Alert("PagoCxP No Se Pudo Guardar Corectamente");
                }
            }
            else
            {
                OtenerDatos();
                Limpiar();
                if (pag.Modificar())
                {
                    Alert("PagoCxP Se Modificada Corectamente");
                }
                else
                {
                    Alert("PagoCxP No Se  Modificar Corectamente");
                }
            }
        }
Beispiel #2
0
 protected void BtnConsulta_Click(object sender, EventArgs e)
 {
     if (Tipo() == "Fecha")
     {
         GridViewVista.DataSource = PagosCxP.ListaF(TbDesde.Text, TbHasta.Text);
         GridViewVista.DataBind();
     }
     else
     {
         GridViewVista.DataSource = PagosCxP.Lista("*", "PagoCxP Where " + Tipo() + " like'" + TbBuscar.Text + "%'");
         GridViewVista.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();
        }