private void BtnPrint_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { object volumnValue = this.searchDonVi.Properties.View.GetFocusedRowCellValue("InOrOut"); VanBanNoiBo vanBanNoiBo = new VanBanNoiBo(); grvExport.BestFitColumns(); //if (radioChonNoiBanHanh.SelectedIndex == 0) //{ // report1.labelthongke = "THỐNG KÊ VĂN BẢN NỘI BỘ NHẬN ĐƯỢC"; //} //if (radioChonNoiBanHanh.SelectedIndex == 1) //{ vanBanNoiBo.labelthongke = "THỐNG KÊ VĂN BẢN NGOÀI NGÀNH NHẬN ĐƯỢC"; //} vanBanNoiBo.labeltungay = "Từ ngày " + DateTuNgay.DateTime.ToShortDateString() + " đến ngày " + DateDenNgay.DateTime.ToShortDateString(); vanBanNoiBo.GridControl = grcExport; ReportPrintTool printTool = new ReportPrintTool(vanBanNoiBo); printTool.ShowPreviewDialog(); }
private void btnExport_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { grvExport.OptionsSelection.MultiSelectMode = default; var volumnValue = this.searchDonVi.Properties.View.GetFocusedRowCellValue("InOrOut"); grvExport.BestFitColumns(); VanBanNoiBo vanBanNoiBo = new VanBanNoiBo(); if ((bool)volumnValue == true) { vanBanNoiBo.labelthongke = "THỐNG KÊ VĂN BẢN NỘI BỘ NHẬN ĐƯỢC"; } else { vanBanNoiBo.labelthongke = "THỐNG KÊ VĂN BẢN NGOÀI NGÀNH NHẬN ĐƯỢC"; } vanBanNoiBo.labeltungay = "Từ ngày " + DateTuNgay.DateTime.ToShortDateString() + " đến ngày " + DateDenNgay.DateTime.ToShortDateString(); vanBanNoiBo.GridControl = grcExport; ReportPrintTool printTool = new ReportPrintTool(vanBanNoiBo); printTool.ShowPreviewDialog(); }