Beispiel #1
0
    public void FillRepeater()
    {
        using (cart obj = new cart())
        {
            obj._userid    = Convert.ToInt64(Session["UserID"].ToString());
            obj._sessionid = Session["Current"].ToString();
            obj._orderid   = Convert.ToInt64("0");

            DataSet ds = new DataSet();
            ds = obj.cart_details();

            if (ds.Tables[0].Rows.Count > 0)
            {
                rptcart.DataSource = ds;
                rptcart.DataBind();
            }
            else
            {
                lblerror.Text      = "No Item In Cart";
                lblerror.Visible   = true;
                rptcart.Visible    = false;
                totaldiv.Visible   = false;
                btnconfirm.Visible = false;
            }
            ds             = obj.cart_total();
            lbltotals.Text = ds.Tables[0].Rows[0]["total"].ToString();
        }
    }
Beispiel #2
0
    public void FillRepeater()
    {
        using (cart obj = new cart())
        {
            DataSet ds = new DataSet();
            if (Request.QueryString["oid"] == "")
            {
                Response.Redirect("Default.aspx");
            }
            else if (Request.QueryString["oid"] != null)
            {
                using (order objo = new order())
                {
                    objo.id = Convert.ToInt64(Request.QueryString["oid"].ToString());
                    ds      = objo.order_byid();
                    lbltotalprice.Visible = false;
                    ptag.Visible          = false;
                }
            }
            else
            {
                obj._userid    = Convert.ToInt64(Session["UserID"].ToString());
                obj._sessionid = Session["Current"].ToString();
                obj._orderid   = Convert.ToInt64("1");
                DataSet dsr = new DataSet();

                ds = obj.cart_details();

                dsr = obj.cart_total();
                lbltotalprice.Text = dsr.Tables[0].Rows[0]["total"].ToString();
            }
            if (ds.Tables[0].Rows.Count > 0)
            {
                rptcart.DataSource = ds;
                rptcart.DataBind();
            }
            else
            {
                rptcart.Visible = false;
            }
        }
    }
Beispiel #3
0
    public void FillRepeater()
    {
        using (cart obj = new cart())
        {
            if (Session["UserID"] != null)
            {
                if (Session["userID"] != "")
                {
                    obj._userid = Convert.ToInt64(Session["UserID"].ToString());
                }
            }
            else
            {
                obj._userid = Convert.ToInt64("0");
            }
            obj._sessionid = Session["Current"].ToString();
            obj._orderid   = Convert.ToInt64("0");

            DataSet ds = new DataSet();
            ds = obj.cart_details();
            Session["itemcount"] = ds.Tables[0].Rows.Count;
            if (ds.Tables[0].Rows.Count > 0)
            {
                rptcart.DataSource = ds;
                rptcart.DataBind();
            }
            else
            {
                rptcart.Visible   = false;
                lblMsg.Text       = "No Product in Cart";
                lblMsg.Visible    = true;
                totaldiv.Visible  = false;
                btnchkout.Visible = false;
            }
            ds                   = obj.cart_total();
            lbltotals.Text       = ds.Tables[0].Rows[0]["total"].ToString();
            Session["itemtotal"] = ds.Tables[0].Rows[0]["total"].ToString();
        }
    }