private void ShowInfo(string Id) { Maticsoft.BLL.Products.Product bll = new Maticsoft.BLL.Products.Product(); Maticsoft.Model.Product model = bll.GetModel(Id); //Maticsoft.BLL.Products.Brand bllb = new Maticsoft.BLL.Products.Brand(); Maticsoft.BLL.Products.Category bllc = new Maticsoft.BLL.Products.Category(); this.lblProductId.Text = model.ProductId.ToString(); this.lblName.Text = model.Name; lblDescn.Text = model.Descn; lblPrice.Text = model.Price.ToString(); lblvipprice.Text = model.VipPrice.ToString(); lblImage.Text = model.Image; //lblBrandId.Text = bllb.GetName(model.BrandId); lblCategoryId.Text = bllc.GetName(model.CategoryId); if (model.Cheapness == 1) { Label1.Text = "ÊÇ"; } else { Label1.Text = "·ñ"; } }
protected void gridView_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { string CategoryId = DataBinder.Eval(e.Row.DataItem, "CategoryId").ToString(); if (CategoryId != "") { string name = bllc.GetName(CategoryId); e.Row.Cells[3].Text = name; } else { e.Row.Cells[3].Text = "未知"; } } }
private void ShowNews(string productID)//显示新闻 { Maticsoft.BLL.Products.Product bll = new Maticsoft.BLL.Products.Product(); Maticsoft.Model.Product model = bll.GetModelByCache(productID); this.lblProductId.Text = model.ProductId.ToString(); this.lblName.Text = model.Name; lblDescn.Text = model.Descn; lblPrice.Text = model.Price.ToString(); lblvipprice.Text = model.VipPrice.ToString(); Image1.ImageUrl = "ProductImages/" + model.Image; Maticsoft.BLL.Products.Category bllc = new Maticsoft.BLL.Products.Category(); lblCategoryId.Text = bllc.GetName(model.CategoryId); if (model.Cheapness == 1) { Label1.Text = "是"; } else { Label1.Text = "否"; } }
//��ʾ���� private void ShowNews(string productID) { Maticsoft.BLL.Products.Product bll = new Maticsoft.BLL.Products.Product(); Maticsoft.Model.Product model = bll.GetModelByCache(productID); this.lblProductId.Text = model.ProductId.ToString(); this.lblName.Text = model.Name; lblDescn.Text = model.Descn; lblPrice.Text = model.Price.ToString(); lblvipprice.Text = model.VipPrice.ToString(); Image1.ImageUrl = "ProductImages/" + model.Image; Maticsoft.BLL.Products.Category bllc = new Maticsoft.BLL.Products.Category(); lblCategoryId.Text = bllc.GetName(model.CategoryId); if (model.Cheapness == 1) { Label1.Text = "��"; } else { Label1.Text = "��"; } }