Пример #1
0
        protected void RendarCart()
        {
            var    GaragID     = Session["UserID"].ToString();
            string CID         = Request.QueryString["cid"].ToString();
            string teratmentID = Request.QueryString["tid"].ToString();

            var       totalPrice = 0.0;
            CartModel model      = new CartModel();
            DataTable data       = model.GetCartData(GaragID, CID, teratmentID);
            var       count      = data.Rows.Count;

            while (count > 0)
            {
                var price = data.Rows[count - 1]["productPrice"].ToString();
                totalPrice += Convert.ToDouble(price);
                count--;
            }
            total.InnerHtml = totalPrice.ToString() + "₪";

            texes.InnerHtml  = Convert.ToDouble((totalPrice + totel) * 0.17).ToString() + "₪";
            result.InnerHtml = (((totalPrice + totel) * 0.17) + totel + totalPrice).ToString() + "₪";
            //texes.InnerHtml = string.Format("{0:0.00}", Convert.ToDouble((totalPrice * 0.17)).ToString()) + "₪";
            //result.InnerHtml = string.Format(" {0:F2}", (((totalPrice + totel) * 0.17) + totel + totalPrice).ToString()) + "₪";
            ShwoPartTreatment.DataSource = data;
            ShwoPartTreatment.DataBind();
        }
Пример #2
0
        public DataTable getPartDetails(string id, string teratmentID)
        {
            DataTable table   = null;
            var       GaragID = Session["UserID"].ToString();
            CartModel model   = new CartModel();

            if (!string.IsNullOrEmpty(id))
            {
                table = model.GetCartData(GaragID, id, teratmentID);
            }

            return(table);
        }
Пример #3
0
        protected void RendarCart()
        {
            var       GaragID     = Session["UserID"].ToString();
            string    CID         = Request.QueryString["ID"].ToString();
            string    teratmentID = Request.QueryString["termid"].ToString();
            var       totalPrice  = 0.0;
            CartModel model       = new CartModel();
            DataTable data        = model.GetCartData(GaragID, CID, teratmentID);
            var       count       = data.Rows.Count;

            while (count > 0)
            {
                var price = data.Rows[count - 1]["productPrice"].ToString();
                totalPrice += Convert.ToDouble(price);
                count--;
            }
            totelCart.InnerHtml  = totalPrice.ToString();
            cart_Item.DataSource = data;
            cart_Item.DataBind();
        }