protected void Page_Load(object sender, EventArgs e) { if (IsPostBack == false) { string maDH = Request.QueryString["MaDH"].ToString(); Xuly_PhanboThanhPham control = new Xuly_PhanboThanhPham(); control.LayDonHangTheoMa(maDH); DAO_Entity daoDH = new DAO_Entity(); DTODonDatHang dtoDH = daoDH.LayDHTheoMa(maDH); lbMaDH.Text = dtoDH.MaDH.ToString(); lbKH.Text = dtoDH.MaKH.ToString(); } try { string madh = Request.QueryString["MaDH"].ToString(); Xuly_PhanboThanhPham control = new Xuly_PhanboThanhPham(); control.LayCTDH(madh); DAO_Entity daokh = new DAO_Entity(); List <DTOChiTietDH> dtoct = daokh.LayDSChiTietDH(madh); GridView1.DataSource = dtoct; GridView1.DataBind(); List <DTOXuLyPhieuGiao> dto = daokh.LayDSPhieuGiao(madh); GridView3.DataSource = dto; GridView3.DataBind(); control.LayDSkhosp(); List <DTOKhoSP> dtok = daokh.LayDSKhoSP(); GridView2.DataSource = dtok; GridView2.DataBind(); } catch { Response.Write("<script>alert('Loi tai du lieu!')</script>"); } }
public void LayDSkhosp() { DAO_Entity dao = new DAO_Entity(); dao.LayDSKhoSP(); }