protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { SanPhamDTO sp = SanPhamBUS.LaySanPhamTheoMaSp(Request.QueryString["qqq"]); lblTenSP.Text = sp.TenSP; imgAnhMinhHoa.ImageUrl = "images/" + sp.AnhMinhHoa; lblThongTin.Text = sp.ThongTin; lblMaSP.Text = sp.MaSP; lblGia.Text = sp.GiaTien.ToString(); lblMaSP.Visible = false; DropDownList_size.DataSource = SanPhamBUS.LaySanPhamTheoTheoSise(Request.QueryString["qqq"]); DropDownList_size.DataTextField = "sizenumber"; DropDownList_size.DataValueField = "SoLuongTonKho"; DropDownList_size.DataBind(); lblSLTK.Text = DropDownList_size.Items[0].Value.ToString(); rpt_LoaiGiay.DataSource = LoaiSanPhamBUS.LayDSLoaiSanPham(); rpt_LoaiGiay.DataBind(); rpt_SizeGiay.DataSource = SizeGiayBUS.LayDSSize(); rpt_SizeGiay.DataBind(); rpt_spcungloai.DataSource = SanPhamBUS.LaySanPhamCungLoaiTrongTrangChiTiet(sp.MaLoaiSP); rpt_spcungloai.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { SanPhamDTO sp = SanPhamBUS.LaySanPhamTheoMaSP(Request.QueryString["masp"]); lblTen.Text = sp.TenSP; imgAnhMinhHoa.ImageUrl = "images/" + sp.Anhminhhoa; lblThongTin.Text = sp.Thongtin; lblGiaTien.Text = sp.Giatien.ToString(); DropDownList_size.DataSource = SanPhamBUS.LaySanPhamTheoSize(Request.QueryString["masp"]); DropDownList_size.DataTextField = "sizenumber"; DropDownList_size.DataValueField = "sizenumber"; DropDownList_size.DataBind(); } }