protected void Page_Load(object sender, EventArgs e) { if (Session["productID"] != null) { productID = int.Parse(Session["productID"] as String); Session["productID"] = null; product = db.PRODUCTs.Where(x => x.Id == productID).FirstOrDefault(); Image1.ImageUrl = product.Img; lbName.Text = product.Name; lbprice.Text = product.Price.ToString(); lbcate.Text = product.CATEGORY.Name; lbDes.Text = product.Description; lbID.Text = productID.ToString(); } }
private void detach_PRODUCTs(PRODUCT entity) { this.SendPropertyChanging(); entity.CATEGORY = null; }
private void attach_PRODUCTs(PRODUCT entity) { this.SendPropertyChanging(); entity.CATEGORY = this; }
partial void DeletePRODUCT(PRODUCT instance);
partial void UpdatePRODUCT(PRODUCT instance);
partial void InsertPRODUCT(PRODUCT instance);