protected void Page_Load(object sender, EventArgs e) { var q = Request["q"]; var size = Request["size"]; if (string.IsNullOrEmpty(size)) { size = "10"; } var trangThai = Request["TrangThai"]; var nhanVien = Request["NhanVien"]; var url = string.Format("?q={0}&size={1}&TrangThai={2}&NhanVien={3}&", q, size, trangThai, nhanVien) + "{1}={0}"; using (var con = DAL.con()) { var pg = PhieuXuatNhapSanPhamDal.pagerNormal(con, url, false, "PXNSP_Ma desc", q, Convert.ToInt32(size), trangThai, nhanVien); List1.List = pg.List; paging = pg.Paging; } }
protected void Page_Load(object sender, EventArgs e) { var d = DateTime.Now; var cuoiThangTruoc = new DateTime(d.Year, d.Month, 1).AddDays(-1); var dauThangSau = d.AddMonths(6); const int size = 10; using (var con = DAL.con()) { var pgChoThueVay = ChoThueVayDal.pagerNormal(con, null, false, "CTV_Ma desc", null, size, null, null); var pgGiatLa = PhieuGiatVayDal.pagerNormal(con, null, false, "PGV_Ma desc", null, size, null, null, null); var pgXuatNhap = PhieuXuatNhapSanPhamDal.pagerNormal(con, null, false, "PXNSP_Ma desc", null, size, null, null); ListChoThueVay.List = pgChoThueVay.List; ListGiatLa.List = pgGiatLa.List; ListXuatNhap.List = pgXuatNhap.List; } }