Ejemplo n.º 1
0
        protected void DropDownList3_SelectedIndexChanged(object sender, EventArgs e)
        {
            Sp_Price_Result classprice = kc.Sp_Price(Convert.ToInt32(DropDownList2.SelectedValue)).ToList().FirstOrDefault(it => it.id == Convert.ToInt32(DropDownList2.SelectedValue));
            int             i          = Convert.ToInt32(DropDownList3.SelectedItem.Text);
            int             bill       = Convert.ToInt32(classprice.price) * i;

            Label1.Text = bill.ToString();
        }
Ejemplo n.º 2
0
        protected void Button2_Click(object sender, EventArgs e)
        {
            Session["Items"]         = DropDownList2.SelectedItem.Text;
            Session["NumberofItems"] = DropDownList3.SelectedItem.Text;

            Sp_Price_Result classprice = kc.Sp_Price(Convert.ToInt32(DropDownList2.SelectedValue)).ToList().FirstOrDefault(it => it.id == Convert.ToInt32(DropDownList2.SelectedValue));
            int             i          = Convert.ToInt32(DropDownList3.SelectedItem.Text);
            int             bill       = Convert.ToInt32(classprice.price) * i;

            Session["price"] = Label1.Text = bill.ToString();

            Response.Write("items added to cart");
        }