private void ExecutePrint(object obj) { GlobalClass.ReportName = GetReportName(); GlobalClass.ReportParams = string.Format("From Date : {0} To {1}", FDate.ToString("MM/dd/yyyy"), TDate.ToString("MM/dd/yyyy")); Report.PrintSettings.PrintPageMargin = new Thickness(30); Report.PrintSettings.AllowColumnWidthFitToPrintPage = false; Report.Print(); }
public override void ExecuteExport(object obj) { GlobalClass.ReportName = "Goods Received Detail"; GlobalClass.ReportParams = string.Format("From Date : {0} To {1}", FDate.ToString("MM/dd/yyyy"), TDate.ToString("MM/dd/yyyy")); wExportFormat ef = new wExportFormat(Report); ef.ShowDialog(); }
private void ExecuteExport(object obj) { GlobalClass.ReportName = GetReportName(); GlobalClass.ReportParams = string.Format("From Date : {0} To {1}", FDate.ToString("MM/dd/yyyy"), TDate.ToString("MM/dd/yyyy")); wExportFormat ef = new wExportFormat(Report); ef.ShowDialog(); }
public void setDate4Dic(DateTime start, DateTime end, FArrayList2 mrca) { // start.getDate().getDateAfter(1); FDate dd = start.Date; int len = (end.Date - start.Date).Days; if (Cache == null) { Cache = new NewCacheTotal(); } if (Cache.KeyPointList == null) { Cache.KeyPointList = new List <FDate>(); } if (Cache.CacheList == null) { Cache.CacheList = new List <DiagTreatKeyPointRntDataDTO>(); } //.getDaysBetween(start.getDate(), end.getDate()); Cache.CacheList.Clear(); Cache.KeyPointList.Clear(); dmap.Clear(); int i = 0; Cache.MrcaList = mrca; for (i = 0; i <= len; i++) { FDate f = start.Date.AddDays(i); var dto = new DiagTreatKeyPointRntDataDTO(); dto.Dt_keypoint = f; if (!dmap.ContainsKey(f.ToString())) { dmap.Add(f.ToString(), dto); } if (!Cache.KeyPointList.Contains(f)) { Cache.KeyPointList.Add(f); } if (!Cache.CacheList.Contains(dto)) { Cache.CacheList.Add(dto); } } }
public override void ExecutePrint(object obj) { GlobalClass.ReportName = "Packing List Report"; GlobalClass.ReportParams = string.Format("From Date : {0} To {1}", FDate.ToString("MM/dd/yyyy"), TDate.ToString("MM/dd/yyyy")); Report.PrintSettings.PrintPageMargin = new Thickness(30); Report.PrintSettings.AllowColumnWidthFitToPrintPage = false; Report.PrintSettings.PrintPageOrientation = PrintOrientation.Landscape; Report.Print(); }
/// <summary> /// 获取缓存数据 /// </summary> public void writeViewData(DiagTreatKeyPointRntDataDTO[] keylist, bool flag) { // var st = new DateTime(start.Year, start.Month, start.Day); if (flag) { var f = new List <FDate>(); if (Cache == null) { Cache = new KeyPointCacheTotal(); } Cache.CacheList.Clear(); Cache.CacheList.Add(keylist[0]); f.Add(keylist[0].Dt_keypoint); FDateTime dt = DateTime.Now; FDate dd = dt.ToTarget.Date; foreach (DiagTreatKeyPointRntDataDTO dataDto in keylist) { if (!Cache.CacheList.Contains(dataDto)) { if (dd.ToString() == dataDto.Dt_keypoint.ToString()) { Cache.CacheList.Add(dataDto); f.Add(dataDto.Dt_keypoint); } else { if ((dataDto.Obsdata != null && dataDto.Obsdata.Count > 0) || (dataDto.Labdata != null && dataDto.Labdata.Count > 0)) { Cache.CacheList.Add(dataDto); f.Add(dataDto.Dt_keypoint); } } } } // this.Cache.KeyPointList = f.OrderBy(x => x).ToList(); Cache.KeyPointList = f; } }
/// <summary> /// 获取缓存数据 /// </summary> public void writeViewData(DiagTreatViewRntDataDTO diagTreatViewRntData, bool flag) { // var st = new DateTime(start.Year, start.Month, start.Day); if (flag) { var f = new List <FDate>(); if (Cache == null) { Cache = new NewCacheTotal(); } if (diagTreatViewRntData.Cimrs != null) { foreach (object dataDto in diagTreatViewRntData.Cimrs) { var tmp = (CiMrDO)dataDto; if (tmp.Dt_rd == null) { continue; } var ftmp = new FDate(tmp.Dt_rd.Value.Date.ToString()); DiagTreatKeyPointRntDataDTO dto = dmap[ftmp.ToString()]; FArrayList2 labfa = dto.Cimrs; if (labfa == null) { labfa = new FArrayList2(); dto.Cimrs = labfa; } labfa.Add(dataDto); //this.Cache.CacheList.Add(dataDto); //f.Add(dataDto.Dt_keypoint); } } //按日期分类 if (diagTreatViewRntData.Bodysignsdata != null) { foreach (object dataDto in diagTreatViewRntData.Bodysignsdata) { var tmp = (Temcharitemdto)dataDto; var ftmp = new FDate(tmp.Logtime.Value.Date.ToString()); DiagTreatKeyPointRntDataDTO dto = dmap[ftmp.ToString()]; FArrayList2 labfa = dto.Bodysignsdata; if (labfa == null) { labfa = new FArrayList2(); dto.Bodysignsdata = labfa; } labfa.Add(dataDto); //this.Cache.CacheList.Add(dataDto); //f.Add(dataDto.Dt_keypoint); } } if (diagTreatViewRntData.Drugdata != null) { foreach (object dataDto in diagTreatViewRntData.Drugdata) { var tmp = (TransSrvSplitOrderDTO)dataDto; if (tmp.Dt_mp_plan == null) { continue; } var ftmp = new FDate(tmp.Dt_mp_plan.Value.Date.ToString()); DiagTreatKeyPointRntDataDTO dto = dmap[ftmp.ToString()]; FArrayList2 labfa = dto.Drugdata; if (labfa == null) { labfa = new FArrayList2(); dto.Drugdata = labfa; } labfa.Add(dataDto); //this.Cache.CacheList.Add(dataDto); //f.Add(dataDto.Dt_keypoint); } } if (diagTreatViewRntData.Labdata != null) { foreach (object dataDto in diagTreatViewRntData.Labdata) { var tmp = (OrSplitOrderDTO)dataDto; var ftmp = new FDate(tmp.Dt_mp_plan.Value.Date.ToString()); DiagTreatKeyPointRntDataDTO dto = dmap[ftmp.ToString()]; FArrayList2 labfa = dto.Labdata; if (labfa == null) { labfa = new FArrayList2(); dto.Labdata = labfa; } labfa.Add(dataDto); //this.Cache.CacheList.Add(dataDto); //f.Add(dataDto.Dt_keypoint); } } if (diagTreatViewRntData.Obsdata != null) { foreach (object dataDto in diagTreatViewRntData.Obsdata) { var tmp = (OrSplitOrderDTO)dataDto; var ftmp = new FDate(tmp.Dt_mp_plan.Value.Date.ToString()); DiagTreatKeyPointRntDataDTO dto = dmap[ftmp.ToString()]; FArrayList2 labfa = dto.Obsdata; if (labfa == null) { labfa = new FArrayList2(); dto.Obsdata = labfa; } labfa.Add(dataDto); //this.Cache.CacheList.Add(dataDto); //f.Add(dataDto.Dt_keypoint); } } // this.Cache.KeyPointList = f.OrderBy(x => x).ToList(); } }
private void LoadReport(object param) { string strSql = string.Empty; try { if (ReportFlag == 0) { strSql = string.Format(@"SELECT SETTLEMENT_ID REPRINTNO, U.UserName PRINTED_BY, CS.TRNDATE BILL_DATE, CS.TRNTIME PRINTED_TIME, CS.AMOUNT, CS.CollectionAmount TAXABLE_AMOUNT, CS.AMOUNT - CS.CollectionAmount TAX_AMOUNT FROM CashSettlement CS JOIN TERMINALS T ON CS.TERMINAL_CODE = T.TERMINAL_CODE JOIN USERS U ON U.UID = CS.SETTLED_UID WHERE CS.TRNDATE BETWEEN '{0}' AND '{1}'{2}", FDate.ToString("MM/dd/yyyy"), TDate.ToString("MM/dd/yyyy"), ((SelectedUser > 0) ? " AND CS.SETTLED_UID = " + SelectedUser : string.Empty)); } LoadColumns(); var data = GetDataTable(strSql); if (data != null && data.Count() == 0) { MessageBox.Show("NoData"); } else { ReportSource = new ObservableCollection <ReportModel>(data); } GlobalClass.SetUserActivityLog(GetReportName(), "View", string.Empty, string.Empty, string.Empty); } catch (Exception ex) { MessageBox.Show(ex.Message, this.MessageBoxCaption, MessageBoxButton.OK, MessageBoxImage.Error); } }
private void LoadReport(object param) { string strSql = string.Empty; try { //VOUCHER DISCOUNT REPORT - DETAILS if (ReportFlag == 0) { strSql = string.Format(@"SELECT VSD.BillNo BILL_NO, CAST(CONVERT(VARCHAR(10),PV.ScannedTime, 101) AS DATETIME) BILL_DATE, RIGHT( CONVERT(VARCHAR, ScannedTime, 0),7) PRINTED_TIME, VSD.VoucherNo REF_NO, PV.VoucherName REMARKS, VSD.DiscountAmount DISCOUNT, PSV.BillTo CUSTOMER_NAME, U.UserName PRINTED_BY FROM VoucherDiscountDetail VSD JOIN ParkingVouchers PV ON VSD.VoucherNo = PV.VoucherNo --AND PV.FYID = VSD.FYID LEFT JOIN ParkingSales PSV ON PV.BillNo = PSV.BillNo AND PSV.FYID = PV.FYID JOIN USERS U ON U.UID = VSD.UID WHERE ScannedTime BETWEEN '{0}' AND '{1}'{2}", FDate.ToString("MM/dd/yyyy"), TDate.ToString("MM/dd/yyyy") + " 23:59:59", (SelectedVoucher == 0)?string.Empty:" AND PV.VoucherId = " + SelectedVoucher); } //VOUCHER DISCOUNT REPORT - SUMMARY else if (ReportFlag == 1) { strSql = string.Format(@"SELECT BILL_DATE, {0}, COUNT(*) REPRINTNO, SUM(DISCOUNT) DISCOUNT FROM ( SELECT CAST(CONVERT(VARCHAR(10),PV.ScannedTime, 101) AS DATETIME) BILL_DATE, PV.VoucherName REMARKS, VSD.DiscountAmount DISCOUNT, PSV.BillTo CUSTOMER_NAME, U.UserName PRINTED_BY FROM VoucherDiscountDetail VSD JOIN ParkingVouchers PV ON VSD.VoucherNo = PV.VoucherNo -- AND PV.FYID = VSD.FYID LEFT JOIN ParkingSales PSV ON PV.BillNo = PSV.BillNo AND PSV.FYID = PV.FYID JOIN USERS U ON U.UID = VSD.UID WHERE ScannedTime BETWEEN '{1}' AND '{2}'{3} ) a GROUP BY BILL_DATE, {0} ORDER BY BILL_DATE", SummaryType, FDate.ToString("MM/dd/yyyy"), TDate.ToString("MM/dd/yyyy") + " 23:59:59", (SelectedVoucher == 0) ? string.Empty : " AND PV.VoucherId = " + SelectedVoucher); } LoadColumns(); var data = GetDataTable(strSql); if (data != null && data.Count() == 0) { MessageBox.Show("NoData"); } else { ReportSource = new ObservableCollection <ReportModel>(data); } GlobalClass.SetUserActivityLog(GetReportName(), "View", string.Empty, string.Empty, string.Empty); } catch (Exception Ex) { MessageBox.Show(Ex.Message, MessageBoxCaption, MessageBoxButton.OK, MessageBoxImage.Error); } }