private void InTongHopKHDAThap() { MTCSYT.SYS_Session session = (MTCSYT.SYS_Session)Session["SYS_Session"]; int ma_dviqly = int.Parse(session.User.ma_dviqly); DM_DVQLYService dm_dviSer = new DM_DVQLYService(); var donvi = dm_dviSer.SelectDM_DVQLY(ma_dviqly); var lst = db.TT_KhachHangDAThapTrongThang(int.Parse(session.User.ma_dviqly + ""), int.Parse("" + Request["Thang"]), int.Parse("" + Request["Nam"])).ToList(); DataTable dt = new DataTable(); dt.Columns.Add("STT"); dt.Columns.Add("TenDonVi"); dt.Columns.Add("SOKH"); dt.Columns.Add("KH160", typeof(decimal)); dt.Columns.Add("KH180", typeof(decimal)); dt.Columns.Add("KH200", typeof(decimal)); dt.Columns.Add("GiaiPhap"); dt.Columns.Add("TienDo"); int stt = 1; foreach (var chitiet in lst) { dt.Rows.Add(stt, chitiet.TEN_DVIQLY, chitiet.SoTBA, chitiet.KH160, chitiet.KH180, chitiet.KH200, chitiet.GiaiPhap, chitiet.TienDoThucHien); stt++; } MTCSYT.Report.KHDAThap report = new MTCSYT.Report.KHDAThap(dt, "" + Request["Thang"], "" + Request["Nam"], donvi.TEN_DVIQLY); ReportViewer1.Report = report; ReportToolbar1.ReportViewer = ReportViewer1; }
private void _DataBind() { MTCSYT.SYS_Session session = (MTCSYT.SYS_Session)Session["SYS_Session"]; grdDVT.DataSource = db.TT_KhachHangDAThapTrongThang(int.Parse(session.User.ma_dviqly + ""), int.Parse(cmbThang.Value + ""), int.Parse("" + cmbNam.Value)).ToList(); grdDVT.DataBind(); }