Beispiel #1
0
    protected void btnclearall_Click(object sender, EventArgs e)
    {
        using (cart obj = new cart())
        {
            if (Session["UserID"] != null)
            {
                if (Session["UserID"] != "")
                {
                    obj._userid    = Convert.ToInt64(Session["UserID"].ToString());
                    obj._sessionid = Session["Current"].ToString();
                    obj._orderid   = Convert.ToInt64("0");

                    obj.cart_clear();
                    FillRepeater();
                    lblMsg.Text    = "Your Cart is Clear";
                    lblMsg.Visible = true;
                }
            }
            else
            {
                obj._userid    = Convert.ToInt64("0");
                obj._sessionid = Session["Current"].ToString();
                obj._orderid   = Convert.ToInt64("0");

                obj.cart_clear();
                FillRepeater();
                lblMsg.Text    = "Your Cart is Clear";
                lblMsg.Visible = true;
            }
        }
    }