예제 #1
0
        protected void DropDownList1_TextChanged(object sender, EventArgs e)
        {
            Calendar1.Visible    = true;
            GridView1.DataSource = Detalle.listarFactura(int.Parse(DropDownList1.SelectedItem.Value));
            GridView1.DataBind();

            string total = Pagar.totalapagar(int.Parse(DropDownList1.SelectedItem.Value));

            if (total != null)
            {
                Label6.Text = "TOTAL A PAGAR ES:   Q" + total.ToString();
            }
            else
            {
                Label6.Text = "TOTAL A PAGAR ES: ";
            }
        }
예제 #2
0
        protected void Button2_Click(object sender, EventArgs e)
        {
            int valor = (int)Detalle.listardetalle();

            Productos.AgregarProducto(DropDownList2.SelectedItem.Text, int.Parse(TextBox2.Text), TextBox3.Text, valor);
            GridView1.DataSource = Detalle.listarFactura(int.Parse(DropDownList1.SelectedItem.Value));
            GridView1.DataBind();
            string total = Pagar.totalapagar(int.Parse(DropDownList1.SelectedItem.Value));

            if (total != null)
            {
                Label6.Text = "TOTAL A PAGAR ES:   Q" + total.ToString();
            }
            else
            {
                Label6.Text = "TOTAL A PAGAR ES: ";
            }
        }