private void FillData() { try { Admins vcontroller = new Admins(); Entities.SanPham vsanpham = new Entities.SanPham(); string errMsg = string.Empty; vsanpham = vcontroller.getby_sanpham(Request.QueryString["ID"], ref errMsg); lblsanpham.Text = vsanpham.TenSP; } catch (Exception ex) { Response.Write(ex.Message); } }
private void FillData() { try { Admins vcontroller = new Admins(); Entities.SanPham vsanpham = new Entities.SanPham(); Entities.Size vsize = new Entities.Size(); Entities.SanPham_Size vsanpham_size = new Entities.SanPham_Size(); string errMsg = string.Empty; string[] listid = Convert.ToString(Request.QueryString["ID"]).Split(new char[] { ',' }); int masp = Convert.ToInt32(listid[0]); int masize = Convert.ToInt32(listid[1]); vsanpham = vcontroller.getby_sanpham(masp.ToString(), ref errMsg); lbltensanpham.Text = vsanpham.TenSP; vsize = vcontroller.getby_size_ID(masize.ToString(), ref errMsg); lblsize.Text = vsize.Size1; vsanpham_size = vcontroller.getby_sanpham_size(masp, masize, ref errMsg); txtsoluong.Text = vsanpham_size.Soluong.ToString(); } catch (Exception ex) { Response.Write(ex.Message); } }
private void FillData() { try { Admins vcontroller = new Admins(); Entities.SanPham vsanpham = new Entities.SanPham(); string errMsg = string.Empty; vsanpham = vcontroller.getby_sanpham(Request.QueryString["ID"], ref errMsg); txttensp.Text = vsanpham.TenSP; Txtthongtin.Text = vsanpham.Thongtin; txtgiamua.Text = vsanpham.Giamua.ToString(); txtgiaban.Text = vsanpham.Giaban.ToString(); ddlgioitinh.SelectedIndex = vsanpham.Gioitinh; ddlChuDe.SelectedIndex = vsanpham.Chude; ddlLoaisanpham.SelectedIndex = vsanpham.LoaiSP; urlhinhanh = vsanpham.Hinhanh; Imgsp.ImageUrl = "~" + vsanpham.Hinhanh.Substring(2); } catch (Exception ex) { Response.Write(ex.Message); } }