Beispiel #1
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            if (this.txt_nombre.Text == "")
            {
                FuncionGlobal.alerta("INGRESE LOS DATOS CORRESPONDIENTES", Page);
                return;
            }

            string add = new FormaPagoBC().add_forma_pago(Convert.ToInt32(id_cliente), this.txt_nombre.Text);

            FuncionGlobal.alerta("FORMA DE PAGO INGRESADA CON EXITO", Page);
            this.txt_nombre.Text = "";

            getformapago();
        }
Beispiel #2
0
        private void comboformapago()
        {
            FormaPago mformapago = new FormaPago();

            mformapago.Id_forma_pago = 0;
            mformapago.Descripcion   = "Seleccionar";

            List <FormaPago> lformapago = new FormaPagoBC().getformapagobycliente(Convert.ToInt32(id_cliente));

            lformapago.Add(mformapago);

            this.dl_forma_pago.DataSource     = lformapago;
            this.dl_forma_pago.DataValueField = "id_forma_pago";
            this.dl_forma_pago.DataTextField  = "descripcion";
            this.dl_forma_pago.DataBind();
            this.dl_forma_pago.SelectedValue = "0";
        }
Beispiel #3
0
        private void getformapago()
        {
            DataTable dt = new DataTable();

            dt.Columns.Add(new DataColumn("id_forma_pago"));
            dt.Columns.Add(new DataColumn("descripcion"));

            List <FormaPago> lformapago = new FormaPagoBC().getformapagobycliente(Convert.ToInt32(id_cliente));

            foreach (FormaPago mformapago in lformapago)
            {
                DataRow dr = dt.NewRow();

                dr["id_forma_pago"] = mformapago.Id_forma_pago;
                dr["descripcion"]   = mformapago.Descripcion;
                dt.Rows.Add(dr);
            }

            this.gr_dato.DataSource = dt;
            this.gr_dato.DataBind();
        }