private void DanhSach() { daSLDenBGGTri dBGGT = new daSLDenBGGTri(); dBGGT.TuNgay = DateTime.Parse(TuNgay); dBGGT.DenNgay = DateTime.Parse(DenNgay); dBGGT.MaBuuCuc = MaBuuCuc; dBGGT.MaDonVi = MaBuuCuc; Double _gt, _st; _gt = Convert.ToDouble(GiaTri); _st = Convert.ToDouble(SoTien); _st = _st / 2; stoChiTietNT.DataSource = dBGGT.DanhSachCTiet(_gt - 500000, _gt + 500000); stoChiTietNT.DataBind(); }
protected void btnXuatExcel_Click(object sender, DirectEventArgs e) { daXuatExcel dXuatE = new daXuatExcel(); dXuatE.TenFileExcel = "BuuGuiPhatCODGiaTriLon" + DateTime.Now.ToString("ddMMyyyHHmmss") + ".xls"; dXuatE.DuongDan = Server.MapPath(".."); dXuatE.TenFileMau = dXuatE.DuongDan + "\\Resource\\FileMauExcel\\MauBGGTri.xls"; daSLDenBGGTri dBGGT = new daSLDenBGGTri(); dBGGT.TuNgay = DateTime.Parse(TuNgay); dBGGT.DenNgay = DateTime.Parse(DenNgay); dBGGT.MaBuuCuc = MaBuuCuc; dBGGT.MaDonVi = MaBuuCuc; Double _gt, _st; _gt = Convert.ToDouble(GiaTri); _st = Convert.ToDouble(SoTien); _st = _st / 2; DataTable dt = dBGGT.DanhSachCTiet(_gt - 500000, _gt + 500000); try { dt.Columns.Remove("Year"); dt.Columns.Remove("DaPhat"); dt.Columns.Remove("DaChuyenHoan"); dt.Columns.Remove("DaHuy"); dt.Columns.Remove("LyDo"); dt.Columns.Remove("NgayHuy"); } catch { } dXuatE.DuLieu = dt; string _url = UIHelper.daPhien.LayDiaChiURL(dXuatE.XuatFileExcel_TheoMau()); Response.Redirect(_url); }