protected void ExportExcelManual(DataTable RecieptTable) { DataTable GeneralInfo = BusinessLogicBridge.DataStore.getGeneralConfig(); string filePath = Environment.GetFolderPath(Environment.SpecialFolder.Personal); filePath = filePath + @"\" + GeneralInfo.Rows[0]["path_all_document"].ToString(); ReportDocuments.income PrintIncome = new DXWindowsApplication2.ReportDocuments.income(); if (Directory.Exists(Path.Combine(filePath,"Report")) == false) { Directory.CreateDirectory(Path.Combine(filePath, "Report")); } string pathname = DXWindowsApplication2.MainForm.CombinePaths(Environment.GetFolderPath(Environment.SpecialFolder.Personal), GeneralInfo.Rows[0]["path_all_document"].ToString(), "Report", "Income_" + DateTime.Now.ToString("yyyyMMdd") + ".xls"); // Building, roomFrom, roomTo, dateFrom, dateTo PrintIncome.loopGenDataRow(RecieptTable, lookUpEditBuilding.Text, lookUpEditRoomFrom.Text, lookUpEditRoomTo.Text, dateEditFromDate.EditValue.To<DateTime>(), dateEditTodate.EditValue.To<DateTime>()); PrintIncome.ExportToXls(pathname); PrintIncome.ShowPreview(); }
protected void ExportExcelManual(DataTable RecieptTable) { DataTable GeneralInfo = BusinessLogicBridge.DataStore.getGeneralConfig(); string filePath = Environment.GetFolderPath(Environment.SpecialFolder.Personal); filePath = filePath + @"\" + GeneralInfo.Rows[0]["path_all_document"].ToString(); ReportDocuments.income PrintIncome = new DXWindowsApplication2.ReportDocuments.income(); if (Directory.Exists(Path.Combine(filePath, "Report")) == false) { Directory.CreateDirectory(Path.Combine(filePath, "Report")); } string pathname = DXWindowsApplication2.MainForm.CombinePaths(Environment.GetFolderPath(Environment.SpecialFolder.Personal), GeneralInfo.Rows[0]["path_all_document"].ToString(), "Report", "Income_" + DateTime.Now.ToString("yyyyMMdd") + ".xls"); // Building, roomFrom, roomTo, dateFrom, dateTo PrintIncome.loopGenDataRow(RecieptTable, lookUpEditBuilding.Text, lookUpEditRoomFrom.Text, lookUpEditRoomTo.Text, dateEditFromDate.EditValue.To <DateTime>(), dateEditTodate.EditValue.To <DateTime>()); PrintIncome.ExportToXls(pathname); PrintIncome.ShowPreview(); }