protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { string ProductID = "24"; if (Request.QueryString["ID"] != null) { ProductID = Request.QueryString["ID"].ToString(); } IList <ProductModel> lpm = AddNewProductBLL.GetAllProductInfoByID(int.Parse(ProductID)); if (lpm.Count > 0) { foreach (ProductModel pm in lpm) { lblPCode.Text = pm.ProductCode.ToString(); lblPName.Text = pm.ProductName; lblPType.Text = ProductModeBLL.GetProductNameByID(pm.PID); lblPrice.Text = pm.PreferentialPrice.ToString("0.00"); lblPPV.Text = pm.PreferentialPV.ToString("0.00"); lblPSpec.Text = SetParametersBLL.GetProductSpecInfoByID(pm.ProductSpecID).Rows[0]["ProductSpecName"].ToString(); div_PDetails.InnerHtml = pm.Description.Length > 1?pm.Description:"无"; ProductImage.ImageUrl = "ReadImage.aspx?ProductID=" + ProductID; } } } }
protected void Page_Load(object sender, EventArgs e) { //获取标准币种 bzCurrency = CommonDataBLL.GetStandard(); // Permissions.ThreeRedirect(Page, "../Member/" + Permissions.redirUrl); if (!IsPostBack) { if (Session["UserType"].ToString() == "2") { top.Visible = false; //bottom.Visible = false; STop1.Visible = true; SLeft1.Visible = true; } else { top.Visible = true; //bottom.Visible = true; STop1.Visible = false; SLeft1.Visible = false; } string ProductID = "24"; if (Request.QueryString["ID"] != null) { ProductID = Request.QueryString["ID"].ToString(); } IList <ProductModel> lpm = AddNewProductBLL.GetAllProductInfoByID(int.Parse(ProductID)); if (lpm.Count > 0) { foreach (ProductModel pm in lpm) { lblPCode.Text = pm.ProductCode.ToString(); lblPName.Text = pm.ProductName; lblPType.Text = ProductModeBLL.GetProductNameByID(pm.PID); lblPrice.Text = pm.PreferentialPrice.ToString("0.00");// ((pm.PreferentialPrice) * (Convert.ToDecimal(AjaxClass.GetCurrency(Convert.ToInt32(bzCurrency), Convert.ToInt32(Session["Default_Currency"].ToString()))))).ToString("0.00"); //lblPPV.Text = pm.PreferentialPV.ToString("0.00"); DataTable dt_gg = SetParametersBLL.GetProductSpecInfoByID(pm.ProductSpecID); if (dt_gg != null && dt_gg.Rows.Count > 0) { lblPSpec.Text = dt_gg.Rows[0]["ProductSpecName"].ToString(); } div_PDetails.InnerHtml = pm.Details_TX.Length > 1 ? pm.Details_TX : "无"; ProductImage.ImageUrl = "../ReadImage.aspx?ProductID=" + ProductID; } } GetCount(); Translations(); } }
protected object GetProName(object obj) { return(ProductModeBLL.GetProductNameByID(Convert.ToInt32(obj))); }