Пример #1
0
        private void GetProductsByProdctId(string productGUID)
        {
            ECommerceBusiness ecb = new ECommerceBusiness();
            DataTable         dt  = ecb.GetProductsByProductID(productGUID);

            if (dt == null)
            {
                dt = new DataTable();
            }

            if (dt.Rows.Count <= 0)
            {
                Panel p = OrderBody;
                p.Style.Add("display", "none");

                p = pCPOD;
                p.Style.Add("display", "none");

                lblMessage.Text = "Sorry something went wrong!";
                lblMessage.Style.Add("display", "block");
            }
            else
            {
                // TODO
                ListedProduct.DataSource = dt;
                ListedProduct.DataBind();
                // End TODO //

                lblProductName.Text = dt.Rows[0]["Product_Name"].ToString();
                lblProductCode.Text = dt.Rows[0]["ProductCode"].ToString();
                Session["price"]    = Convert.ToInt32(dt.Rows[0]["Price"].ToString());
                lblTotalPrice.Text  = Session["price"].ToString();

                DataTable userDt = (DataTable)Session["UserWholeRecord"];
                txtCustomerName.Text = userDt.Rows[0]["fullname"].ToString();

                int quantity = Convert.ToInt32(dt.Rows[0]["Quantity"].ToString());

                InitializeDropDownList(quantity);
            }
        }