Beispiel #1
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 #2
0
        protected void BtnSiguiente_Click(object sender, EventArgs e)
        {
            if (TbIdCobro.Text == string.Empty)
            {

                if (Session["CobroDetalle"] != null)
                {
                    Cob = (CobroCxC)Session["CobroDetalle"];
                }
                OtenerDatos();

                if (Cob.Insertar())
                {

                    Alert("CobroCxC Se Guardo Corectamente");

                    Limpiar();
                }
                else
                {

                    Alert("CobroCxC No Se Pudo Guardar Corectamente");
                }
            }
            else
            {

                OtenerDatos();
                Limpiar();
                if (Cob.Modificar())
                {

                    Alert("CobroCxC Se Modificada Corectamente");

                }
                else
                {
                    Alert("CobroCxC No Se  Modificar Corectamente");
                }

            }
        }
Beispiel #3
0
 public static DataTable ListaF(string fecha1, string fecha2)
 {
     return(CobroCxC.Lista("*", " Fecha   <='" + fecha1 + "' and Fecha >='" + fecha2 + "' "));
 }