Exemple #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ProductRepositoy r = new ProductRepositoy();
            int     id         = Convert.ToInt32(Request.QueryString["id"]);
            Product P          = r.GetProduct(id);

            ProductId.Text = P.PId.ToString();
        }
Exemple #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                ProductRepositoy r  = new ProductRepositoy();
                BrandRepository  br = new BrandRepository();
                int          id     = Convert.ToInt32(Request.QueryString["id"]);
                Product      P      = r.GetProduct(id);
                List <Brand> L      = br.GetBrand();

                ProductIdtxt.Text     = P.PId.ToString();
                ProdcutImgUrltxt.Text = P.PURL.ToString();
                ProductNametxt.Text   = P.PName.ToString();
                ProductPricetxt.Text  = P.PPrice.ToString();
                Decriptiontxt.Text    = P.PDescription.ToString();
                foreach (Brand b in L)
                {
                    DropDownList1.SelectedValue = b.BrandId.ToString();
                }
            }
        }