public void fillcart()
 {
     try{
         int totalprice = 0;
         lblpay.Text      = "0";
         lblquantity.Text = "0";
         dt0 = objdf2.FillDT("select * from ORDER_MASTER where User_Id ='" + Session["login"] + "' ");
         foreach (DataRow row in dt0.Rows)
         {
             int amount = Convert.ToInt32(row["Order_Price"]);
             totalprice       = totalprice + amount;
             lblpay.Text      = totalprice.ToString();
             lblquantity.Text = (Count.countcart(Convert.ToInt32(Session["login"])).ToString());
         }
         Repeater1.DataSource = dt0;
         Repeater1.DataBind();
         lbltotal.Text = totalprice.ToString();
         //imgproductimg.ImageUrl = dt0.Tables[0].Rows[0]["Product_Image"].ToString();
         //lblproductname.Text = dt.Tables[0].Rows[0]["Product_Name"].ToString();
         //lblProductnamee.Text = ds.Tables[0].Rows[0]["Product_Name"].ToString();
         //lblproductcolour.Text = ds.Tables[0].Rows[0]["Product_Colour"].ToString();
         //lblproductdisprice.Text = ds.Tables[0].Rows[0]["Product_Dis_Price"].ToString();
         //lblproductdiscount.Text = ds.Tables[0].Rows[0]["Product_Discount"].ToString();
         //lblproductprice.Text = ds.Tables[0].Rows[0]["Product_Price"].ToString();
         //lblproductpricee.Text = ds.Tables[0].Rows[0]["Product_Price"].ToString();
         //lbltotal.Text = ds.Tables[0].Rows[0]["Product_Price"].ToString();
         //lblpay.Text = ds.Tables[0].Rows[0]["Product_Price"].ToString();
     }
     catch (Exception ex)
     {
         Response.Write("<script>alert('Error Occured Please Contact to Admin')</script>");
     }
 }
Beispiel #2
0
    public static int countcart(int user)
    {
        DataFuction objdf = new DataFuction();
        DataTable   dt    = new DataTable();

        dt = objdf.FillDT("select * from ORDER_MASTER where User_Id ='" + user + "'");
        int countcartvalue = dt.Rows.Count;

        return(countcartvalue);
    }
 public void countcart()
 {
     try{
         dt0 = objdf.FillDT("select * from ORDER_MASTER where User_Id ='" + Session["login"] + "'");
         lblcartcount.Text = dt0.Rows.Count.ToString();
     }
     catch (Exception ex)
     {
         Response.Write("<script>alert('Error Occured Please Contact to Admin')</script>");
     }
 }