/// <summary> /// COM03未銷點報表 /// </summary> /// <param name="ParameterList">變數清單</param> /// <returns>回傳查詢結果</returns> public DataTable COM03_2(ArrayList ParameterList, string ReportOutputFormat, ref ReportList.ExcelOtherType EOT ) { COMModel.QueryQtySum bco = new COMModel.QueryQtySum(ConntionDB); DataTable Dt = new DataTable(); switch (ParameterList[9].ToString()) { case "1": Dt = bco.QueryNonSaleStoreByChanNo(ParameterList); break; case "2": Dt = bco.QueryNonSaleStoreByZO(ParameterList); break; case "3": Dt = bco.QueryNonSaleStoreByAreaCode(ParameterList); break; default: break; } if (Dt.Rows.Count == 0) { throw new Exception("查無資料"); } else { return Dt; } }
/// <summary> /// COM03報表 /// </summary> /// <param name="ParameterList">變數清單</param> /// <returns>回傳查詢結果</returns> public DataTable COM03_1(ArrayList ParameterList, string ReportOutputFormat, ref ReportList.ExcelOtherType EOT ) { COMModel.QueryQtySum bco = new COMModel.QueryQtySum(ConntionDB); DataTable Dt = new DataTable(); switch (ParameterList[8].ToString()) { case "1": Dt = bco.QueryByChanNo(ParameterList); break; case "2": Dt = bco.QueryByZO(ParameterList); break; case "3": Dt = bco.QueryByAreaCode(ParameterList); break; } if (Dt.Rows.Count == 0) { throw new Exception("查無資料"); } else { DataRow[] dr = Dt.Select("ROW_NO='合計'"); Dt.Rows.Remove(dr[0]); //DataTable dt = new DataView(Dt, "ROW_NO not in ('合計')", string.Empty, DataViewRowState.CurrentRows).ToTable(); return Dt; } }
/// <summary> /// VGI08_1報表(列印鈕) /// </summary> /// <param name="ParameterList">變數清單</param> /// <returns>回傳查詢結果</returns> public DataTable IVM24_1(ArrayList ParameterList, string ReportOutputFormat, ref ReportList.ExcelOtherType EOT) { #region IVMModel.PrintDPSBookPickList BCO = new IVMModel.PrintDPSBookPickList(ConntionDB); DataTable Dt = BCO.PrintRpt01(ParameterList); if (Dt.Rows.Count == 0) { throw new Exception("查無資料"); } //設定使用第三方元件匯出EXCEL if (ReportOutputFormat == "EXCEL") { EOT = ReportList.ExcelOtherType.None; } return Dt; #endregion }
/// <summary> /// STM30_2報表(地區店數統計表) /// </summary> /// <param name="ParameterList">變數清單</param> /// <returns>回傳查詢結果</returns> public DataTable STM30_2(ArrayList ParameterList, string ReportOutputFormat, ref ReportList.ExcelOtherType EOT ) { #region STMModel.PrinStoreCountStatic bco = new STMModel.PrinStoreCountStatic(ConntionDB); DataTable Dt = new DataTable(); Dt = bco.PrintByArea(); if (Dt == null || Dt.Rows.Count == 0) { throw new Exception("查無資料"); } else { if (ReportOutputFormat == "EXCEL") { EOT = ReportList.ExcelOtherType.Normal;//如要匯出EXCEL此為必要設定 Dt.Columns[0].ColumnName = "通路代號"; Dt.Columns[1].ColumnName = "通路名稱"; // Dt.Columns[2].ColumnName = "轉運站"; Dt.Columns[2].ColumnName = "地區"; Dt.Columns[3].ColumnName = "店數"; Dt.Columns[4].ColumnName = "通路合計"; } return Dt; } #endregion }
/// <summary> /// Triggered when user refreshes the page /// </summary> /// <returns></returns> public async Task GetUpdatedReports() { ReportList.Clear(); List <Report> reports = new List <Report>(); if (CrossConnectivity.IsSupported && CrossConnectivity.Current.IsConnected) { var remoteReports = await ServerDatabaseService.GetReportsByEmployee(UserDataCache.CurrentEmployeeData); await DatabaseService.InsertListReportData(remoteReports); reports = await GetReportsByEmployee(UserDataCache.CurrentEmployeeData); } else if (!CrossConnectivity.IsSupported || !CrossConnectivity.Current.IsConnected) { // update from the local database reports = await GetReportsByEmployee(UserDataCache.CurrentEmployeeData); } foreach (var report in reports) { ReportList.Add(report); } // update the cached list InspectionDataCache.CachedReportsList = reports; }
/// <summary> /// PIU08_2報表(匯出鈕)-依儲位排序 /// </summary> /// <param name="ParameterList">變數清單</param> /// <param name="ReportOutputFormat">報表格式(PDF,EXCEL)</param> /// <param name="EOT">匯出Excel方式</param> /// <returns>回傳查詢結果</returns> public DataTable PUR08_2(ArrayList ParameterList, string ReportOutputFormat, ref ReportList.ExcelOtherType EOT ) { #region PURModel.PUR08_BCO BCO = new PURModel.PUR08_BCO(ConntionDB); DataTable Dt = BCO.GetPurchaseDetailData(ParameterList); if (Dt.Rows.Count == 0) { throw new Exception("查無資料"); } //設定使用第三方元件匯出EXCEL if (ReportOutputFormat == "EXCEL") { #region 表頭 #endregion EOT = ReportList.ExcelOtherType.None; } return Dt; #endregion }
private void GetMail() { string receiverid = Request.Cookies["id"].Value.ToString(); string mailtype = "开题材料"; Fannie.Mail ml = new Fannie.Mail(); DataTable dt = new DataTable(); DataSet ds = ml.GetMail("2", receiverid, mailtype); DataColumn dc = new DataColumn(); dc.ColumnName = "DataNo"; ds.Tables[0].Columns.Add(dc); for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { ds.Tables[0].Rows[i]["DataNo"] = (i + 1).ToString(); } ReportList.DataKeyNames = new string[] { "MailNo" }; ReportList.DataSource = ds; ReportList.DataBind(); dt = ds.Tables[0]; if (dt.Rows.Count == 0) { Label1.Visible = true; } else { Label1.Visible = false; } }
public IEnumerable <string> ToColumnReport(string Title = null) { var report = new ReportList(); if (Title != null) { report.WriteTextLine(Title); } foreach (var workstationCmd in this) { if (workstationCmd is WriteToDisplayCommand) { report.WriteGapLine(); report.WriteTextLine("Write to display command"); var wtdCmd = workstationCmd as WriteToDisplayCommand; var printedLines = wtdCmd.ToColumnReport(); report.WriteTextLines(printedLines); } else if (workstationCmd is IDataStreamReport) { report.WriteGapLine(); var iReport = workstationCmd as IDataStreamReport; var report2 = iReport.ToColumnReport(); report.WriteTextLines(report2); } else { var textLine = workstationCmd.ToString(); report.WriteTextLine(textLine); } } return(report); }
/// <summary> /// Lists all available reports for the given user profile. /// </summary> /// <param name="userProfileId"> /// The ID number of the DFA user profile to run this request as. /// </param> /// <param name="maxPageSize">The maximum number of results per page.</param> public void List(long userProfileId, int maxPageSize) { Console.WriteLine("================================================================="); Console.WriteLine("Listing all reports"); Console.WriteLine("================================================================="); // Retrieve account list in pages and display data as we receive it. string pageToken = null; ReportList reports = null; do { var request = service.Reports.List(userProfileId); request.MaxResults = maxPageSize; request.PageToken = pageToken; reports = request.Execute(); foreach (var report in reports.Items) { Console.WriteLine("Report with ID \"{0}\" and display name \"{1}\" was found.", report.Id, report.Name); } pageToken = reports.NextPageToken; } while (reports.Items.Count > 0); Console.WriteLine(); }
protected void Page_LoadComplete(object sender, EventArgs e) { Processes.Check_status(); try { ReportList = ClientReports.GenerateClientReport(Request.QueryString["Client"], Request.QueryString["Start"], Request.QueryString["End"]); foreach (var item in ReportList.ToList()) { ClientReports.Sum += TimeSpan.Parse(item.Fulltime); } } catch (Exception) { } rpTableClients.DataSource = ReportList; rpTableClients.DataBind(); ddlClient.DataSource = ClientList; ddlClient.DataTextField = "Title"; ddlClient.DataValueField = "IDClient"; ddlClient.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { try { if (!IsPostBack) { LoadTitle(); ReportList.DataSource = string.Empty; ReportList.DataBind(); DateTime sd = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1); dtpfordate.SelectedDate = sd; dtpuntildate.SelectedDate = DateTime.Now; lbltotdebitcredit.Text = ""; } } catch (Exception ex) { WebMsgBox.Show(ex.Message); } }
private void DeleteScannedData(ScanData data) { try { if (User == null) { return; } if (!User.SuperUser) { Alert("Uwaga", "Brak uprawnień! Zaloguj się na użytkownika posiadającego prawa administracyjne!", "Ok."); return; } IsBusy = true; if (Delete(data)) { var items = ReportList.Where(w => w.DataValue == data.DataValue).ToList(); foreach (ScanData item in items) { ReportList.Remove(item); } Alert("Sukcess", "Usuwanie zakończone.", "Ok."); } } catch (Exception ex) { Alert("Błąd", ex.Message, "Ok."); } finally { IsBusy = false; } }
private void LoadUsageBilling() { try { DataSet dsStatement = sqlobj.ExecuteSP("SP_DailyUsageBilling ", new SqlParameter() { ParameterName = "@FromDate", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.DateTime, Value = dtpfordate.SelectedDate }, new SqlParameter() { ParameterName = "@ToDate", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.DateTime, Value = dtpuntildate.SelectedDate } ); if (dsStatement.Tables[0].Rows.Count > 0) { ReportList.DataSource = dsStatement; ReportList.DataBind(); } else { ReportList.DataSource = string.Empty; ReportList.DataBind(); } } catch (Exception ex) { WebMsgBox.Show(ex.Message); } }
protected void LoadGrid1() { SqlCommand cmd = new SqlCommand("[SP_FetchGBilledTransaction]", con); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("@BCode ", SqlDbType.NVarChar).Value = ddlSession.SelectedValue; cmd.Parameters.Add("@TxnDate", SqlDbType.DateTime).Value = BillingDate.SelectedDate; DataSet dsGrid = new DataSet(); ReportList.DataBind(); SqlDataAdapter da = new SqlDataAdapter(cmd); da.Fill(dsGrid); if (dsGrid != null && dsGrid.Tables.Count > 0 && dsGrid.Tables[0].Rows.Count > 0) { ReportList.DataSource = dsGrid.Tables[0]; ReportList.DataBind(); ReportList.AllowPaging = true; lblTotalAmt.Text = "Total Amount : " + dsGrid.Tables[1].Rows[0]["TotAmount"].ToString(); } else { ReportList.DataSource = new String[] { }; ReportList.DataBind(); } }
public Report() { InitializeComponent(); comboBoxModel.Items.Clear(); ReportList.Clear(); DateTime startFilterTime = DateTime.Now; DateTime endFilterTime = DateTime.Now; while (DateTime.Compare(endFilterTime, startFilterTime) >= 0) { string folderReport = @"C:\DaeyoungVN\FCT\History\" + startFilterTime.ToString("yyyy") + "\\" + startFilterTime.ToString("MMMM") + "\\" + startFilterTime.ToString("dd") + "\\"; if (Directory.Exists(folderReport)) { string[] fileReport = Directory.GetFiles(folderReport, "*.txt"); for (int i = 0; i < fileReport.Length; i++) { ReportList.Add(fileReport[i]); string fileName = Path.GetFileNameWithoutExtension(fileReport[i]); comboBoxModel.Items.Add(fileName); } } startFilterTime = startFilterTime.AddDays(1); } if (comboBoxModel.Items.Count > 0) { comboBoxModel.SelectedIndex = 0; } }
protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { if (keyData == (Keys.Control | Keys.F)) { SearchNode dlg = new SearchNode(rptFiles.RptFileTable); dlg.Show(); dlg.SearchNodeByName += new EventHandler <NodeEventArgs>(SearchNodeByName); } if (keyData == (Keys.Control | Keys.B)) { if (Function.Confirm("是否进行批量点击测试?", "提示")) { ReportList.ExpandAll(); Timer t = new Timer(); t.Interval = 1000; t.Tick += new EventHandler(t_Tick); t.Start(); } } if (keyData == Keys.Escape) { bStop = true; } return(base.ProcessCmdKey(ref msg, keyData)); }
protected void LoadAccountLedger() { try { DataSet dsCategory = sqlobj.ExecuteSP("SP_AccountMaster", new SqlParameter() { ParameterName = "@IMode", SqlDbType = SqlDbType.Int, Value = 3 }); if (dsCategory.Tables[0].Rows.Count > 0) { ReportList.DataSource = dsCategory.Tables[0]; ReportList.DataBind(); lblCount.Text = "Count :" + dsCategory.Tables[0].Rows.Count.ToString(); Session["ExportExcel"] = null; Session["ExportExcel"] = dsCategory.Tables[0]; BtnnExcelExport.Visible = true; } else { ReportList.DataSource = string.Empty; ReportList.DataBind(); } dsCategory.Dispose(); } catch (Exception ex) { WebMsgBox.Show(ex.Message); } }
protected void LoadGrid() { try { SqlProcsNew sqlobj = new SqlProcsNew(); DataSet dsGroup = null; dsGroup = sqlobj.ExecuteSP("SP_DiningHealthCheck", new SqlParameter() { ParameterName = "@IMODE", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.Int, Value = 1 }, new SqlParameter() { ParameterName = "@BillPeriod", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.Decimal, Value = Convert.ToDecimal(ddlBilling.SelectedValue) }, new SqlParameter() { ParameterName = "@Type", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.NVarChar, Value = Convert.ToDecimal(ddlType.SelectedValue) }); ReportList.DataSource = dsGroup.Tables[0]; ReportList.DataBind(); dsGroup.Dispose(); txtHSTot.Text = "Confirmation Pending (" + dsGroup.Tables[1].Rows[0]["TotCnt"].ToString() + ")"; } catch (Exception ex) { WebMsgBox.Show(ex.Message.ToString()); } }
private void LoadStockSummaryReport() { try { DataSet dsStockTransaction = sqlobj.ExecuteSP("SP_StockDailySummary", new SqlParameter() { ParameterName = "@Group", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.NVarChar, Value = ddlGroup.SelectedValue == "All" ? null : ddlGroup.SelectedValue }, new SqlParameter() { ParameterName = "@Date", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.DateTime, Value = dtpfordate.SelectedDate } ); if (dsStockTransaction.Tables[0].Rows.Count > 0) { ReportList.DataSource = dsStockTransaction; ReportList.DataBind(); } else { ReportList.DataSource = string.Empty; ReportList.DataBind(); } } catch (Exception ex) { WebMsgBox.Show(ex.Message); } }
protected void LoadGrid() { SqlProcsNew proc = new SqlProcsNew(); DataSet dsGrid = new DataSet(); dsGrid = proc.ExecuteSP("SP_GetMobAppDinersList", new SqlParameter() { ParameterName = "@iMode", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.Int, Value = 1 }, new SqlParameter() { ParameterName = "@FromDate", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.DateTime, Value = dtpfordate.SelectedDate }, new SqlParameter() { ParameterName = "@ToDate", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.DateTime, Value = dtpuntildate.SelectedDate }); if (dsGrid != null && dsGrid.Tables.Count > 0 && dsGrid.Tables[0].Rows.Count > 0) { ReportList.DataSource = dsGrid.Tables[0]; ReportList.DataBind(); } else { ReportList.DataSource = new String[] { }; ReportList.DataBind(); } }
private void BindData() { ReportBLL reportBL = new ReportBLL(connectionString); ReportList.DataSource = reportBL.GetReportInventory(); ReportList.DataBind(); }
protected void BtnShow_Click(object sender, EventArgs e) { try { string strrsnfilter = cmbResident.SelectedItem.Text; if (cmbResident.SelectedValue != "0") { rdTrailBal.Visible = false; string[] custrsn = strrsnfilter.Split(','); Session["RName"] = custrsn[0].ToString(); ReportList.DataSource = string.Empty; ReportList.DataBind(); LoadGrid1(); } if (cmbResident.SelectedValue == "0") { string STR = cmbResident.SelectedValue; DataSet dsStatement = new DataSet(); dsStatement = sqlobj.ExecuteSP("SP_DayBookData", new SqlParameter() { ParameterName = "@IMode", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.Int, Value = 1 }, new SqlParameter() { ParameterName = "@FromDate", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.DateTime, Value = dtpfordate.SelectedDate }, new SqlParameter() { ParameterName = "@ToDate", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.DateTime, Value = dtpuntildate.SelectedDate } ); Session["Exportexcel"] = null; if (dsStatement.Tables[0].Rows.Count > 0) { ReportList.DataSource = dsStatement.Tables[0]; ReportList.DataBind(); Session["Exportexcel"] = dsStatement.Tables[0]; } else { ReportList.DataSource = string.Empty; ReportList.DataBind(); ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "alert", "alert('No data for your selection, Please try again for some other details.');", true); return; } dsStatement.Dispose(); } } catch (Exception ex) { WebMsgBox.Show(ex.ToString()); } }
private void LoadGrid() { try { DataSet dsStatement = sqlobj.ExecuteSP("SP_ScheduleSummary ", new SqlParameter() { ParameterName = "@FromDate", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.DateTime, Value = dtpfordate.SelectedDate }, new SqlParameter() { ParameterName = "@ToDate", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.DateTime, Value = dtpuntildate.SelectedDate } ); if (dsStatement.Tables[0].Rows.Count > 0) { ReportList.DataSource = dsStatement; ReportList.DataBind(); } dsStatement.Dispose(); } catch (Exception ex) { WebMsgBox.Show(ex.Message); } }
/// <summary> /// ALO21_1報表_轉單前檢查差異EXCEL /// </summary> /// <param name="ParameterList">變數清單</param> /// <returns>回傳查詢結果</returns> public DataTable ALO21_1(ArrayList ParameterList, ref ReportList.ExcelOtherType EOT) { #region ALOModel.MaintainStAccept BCO = new ALOModel.MaintainStAccept(ConntionDB); DataTable Dt = BCO.QueryCheckErrorInfo(ParameterList); if (Dt != null && Dt.Rows.Count > 0) { #region 表頭:如要指定表頭必設定 Dt.Columns[0].ColumnName = "配本序號"; Dt.Columns[1].ColumnName = "品號"; Dt.Columns[2].ColumnName = "品名"; Dt.Columns[3].ColumnName = "通路"; Dt.Columns[4].ColumnName = "店號"; Dt.Columns[5].ColumnName = "店名"; Dt.Columns[6].ColumnName = "期別"; Dt.Columns[7].ColumnName = "差異原因"; #endregion EOT = ReportList.ExcelOtherType.Normal;//如要匯出EXCEL此為必要設定 return Dt; } else { throw new Exception("查無資料!!"); } #endregion }
public MainWindowViewModel() { GetCrash.Execute(null); reportBaseContext = new ReportBaseContext(); string login = Environment.UserName; if (string.IsNullOrEmpty(login)) { throw new Exception("Логин пользователя не может быть пустым!"); } var _rpt_lst = (from r in reportBaseContext.Reports join ur in reportBaseContext.UsersReports on r.RptId equals ur.RptId where ur.UsrLogin.Equals(login) select r).ToList(); if (_rpt_lst.Count <= 0) { throw new Exception("Для указанного пользователя нет доступных отчётов"); } foreach (var item in _rpt_lst) { ReportList.Add(item); } LoadingText = "Открыто окно отчёта. Для просмотра другого отчёта, закройте окно текущего отчёта"; }
protected void BtnShow_Click(object sender, EventArgs e) { try { ReportList.Visible = true; string strrsnfilter = cmbResident.SelectedItem.Text; if (cmbResident.SelectedValue != "0" && cmbResident.SelectedValue != "1") { rdTrailBal.Visible = false; string[] custrsn = strrsnfilter.Split(','); Session["RName"] = custrsn[0].ToString(); lblClosingbal.Visible = true; lblClosingbalval.Visible = true; //LoadGrid1(); LoadOtherDet(); } else if (cmbResident.SelectedValue != "0" && cmbResident.SelectedValue == "1") { LoadGrid1(); } else { ReportList.DataSource = string.Empty; ReportList.DataBind(); ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "alert", "alert('There is no Transaction for selected date range!');", true); } } catch (Exception ex) { WebMsgBox.Show(ex.ToString()); } }
protected void Page_Load(object sender, EventArgs e) { SqlProcsNew proc = new SqlProcsNew(); DataSet dsDT = null; if (!IsPostBack) { LoadTitle(); CheckPermission(); dsDT = proc.ExecuteSP("GetServerDateTime"); // LoadBillingPeriod(); //ddlBillingPeriod.SelectedValue = Session["CurrentBillingPeriod"].ToString(); ReportList.Visible = false; ReportListAll.Visible = false; ReportList.DataSource = string.Empty; ReportList.DataBind(); DateTime sd = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1); dtpfordate.SelectedDate = sd; dtpuntildate.SelectedDate = DateTime.Now; lbltotdebitcredit.Text = ""; LoadResidentDet(); LoadSessionFilter(); LoadAccountNo(); LoadDate(); //LoadGrid1(); } }
protected void LoadGrid1() { try { string STR = cmbResident.SelectedValue; DataSet dsStatement = new DataSet(); if (cmbResident.SelectedValue != "0") { dsStatement = sqlobj.ExecuteSP("SP_SOAGeneralTransactions", new SqlParameter() { ParameterName = "@IMode", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.Int, Value = 1 }, new SqlParameter() { ParameterName = "@FromDate", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.DateTime, Value = dtpfordate.SelectedDate }, new SqlParameter() { ParameterName = "@ToDate", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.DateTime, Value = dtpuntildate.SelectedDate }, new SqlParameter() { ParameterName = "@AccountCode", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.NVarChar, Value = lblAccountCode.Text.ToString() } ); } Session["Exportexcel"] = null; if (dsStatement.Tables[0].Rows.Count > 0) { //int rowindex = Convert.ToInt32(dsStatement.Tables[0].Rows.Count - 1); //lblClosingbalval.Visible = true; //lblClosingbal.Visible = true; //lblClosingbalval.Text = dsStatement.Tables[0].Rows[rowindex]["Closing"].ToString(); ReportList.DataSource = dsStatement; ReportList.DataBind(); Session["Exportexcel"] = dsStatement.Tables[0]; } else { ReportList.DataSource = string.Empty; ReportList.DataBind(); } //if (dsStatement.Tables[1].Rows.Count > 0) //{ // lblDebitCnt.Text = dsStatement.Tables[1].Rows[0]["DR"].ToString(); //} //if (dsStatement.Tables[2].Rows.Count > 0) //{ // lblCreditcnt.Text = dsStatement.Tables[2].Rows[0]["CR"].ToString(); //} dsStatement.Dispose(); } catch (Exception ex) { WebMsgBox.Show(ex.Message); } }
public ReportWindow() : base(null) { Caption = Resources.ToolWindowTitle; BitmapResourceID = 301; BitmapIndex = 1; Content = new ReportList(); }
private void frmEmployeeDirectory_Load(object sender, EventArgs e) { this.reportViewer1.RefreshReport(); ReportList reportList = new ReportList(); this.CLSEmployeeBindingSource.DataSource = reportList.GetEmployeeDirectory(); this.reportViewer1.RefreshReport(); }
}//frmPrintOrderDetails(.) private void frmPrintOrderDetails_Load(object sender, EventArgs e) { this.reportViewer1.RefreshReport(); ReportList ReportList = new ReportList(); this.CLSLineItemBindingSource.DataSource = ReportList.FetchCLSLineItems(_myOrderId); this.reportViewer1.RefreshReport(); }//frmPrintOrderDetails_Load(..)
private void ReportAdd(string id, string name) { var report = ReportInit(id, name); ReportList.Add(report); SaveReportList(); SelectedReport = report; }
}//frmVendorProductReport() private void frmVendorProductReport_Load(object sender, EventArgs e) { this.reportViewer1.RefreshReport(); ReportList reportList = new ReportList(); this.CLSVendorProductBindingSource.DataSource = reportList.GetVendorProducts(); this.reportViewer1.RefreshReport(); }//frmVendorProductReport_Load(..)
}//frmPrintPackReport(.) private void frmPrintPackReport_Load(object sender, EventArgs e) { this.reportViewer1.RefreshReport(); ReportList reportList = new ReportList(); this.CLSPackDetailsBindingSource.DataSource = reportList.FetchPackingDetails(_currentOrder); this.reportViewer1.RefreshReport(); }//frmPrintPackReport_Load(..)
protected void LoadGrid1() { try { string STR = cmbResident.SelectedValue; DataSet dsStatement = new DataSet(); if (cmbResident.SelectedValue != "0") { dsStatement = sqlobj.ExecuteSP("SP_SOAGeneralTransactions", new SqlParameter() { ParameterName = "@IMode", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.Int, Value = 1 }, new SqlParameter() { ParameterName = "@FromDate", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.DateTime, Value = dtpfordate.SelectedDate }, new SqlParameter() { ParameterName = "@ToDate", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.DateTime, Value = dtpuntildate.SelectedDate }, new SqlParameter() { ParameterName = "@AccountCode", Direction = ParameterDirection.Input, SqlDbType = SqlDbType.NVarChar, Value = lblAccountCode.Text.ToString() } ); } Session["Exportexcel"] = null; if (dsStatement.Tables[0].Rows.Count > 0) { ReportList.DataSource = dsStatement; ReportList.DataBind(); Session["Exportexcel"] = dsStatement.Tables[0]; } else { ReportList.DataSource = string.Empty; ReportList.DataBind(); ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "alert", "alert('No data for your selection, Please try again for some other details.');", true); return; } //if (dsStatement.Tables[1].Rows.Count > 0) //{ // lblDebitCnt.Text = dsStatement.Tables[1].Rows[0]["DR"].ToString(); //} //if (dsStatement.Tables[2].Rows.Count > 0) //{ // lblCreditcnt.Text = dsStatement.Tables[2].Rows[0]["CR"].ToString(); //} dsStatement.Dispose(); } catch (Exception ex) { WebMsgBox.Show(ex.Message); } }
/// <summary> /// CRM16_1報表(匯出鈕) /// </summary> /// <param name="ParameterList">變數清單</param> /// <param name="ReportOutputFormat">報表格式(PDF,EXCEL)</param> /// <param name="EOT">匯出Excel方式</param> /// <returns>回傳查詢結果</returns> public DataTable IVM18_1(ArrayList ParameterList, string ReportOutputFormat, ref ReportList.ExcelOtherType EOT ) { #region IVMModel.PrintRemoveDetl BCO = new IVMModel.PrintRemoveDetl(ConntionDB); //todo要判別模式 DataTable Dt = BCO.PrintRpt01(ParameterList); if (Dt.Rows.Count == 0) { throw new Exception("查無資料"); } //設定使用第三方元件匯出EXCEL if (ReportOutputFormat == "EXCEL") { #region 表頭 //Dt.Columns[0].ColumnName = "群分類"; //Dt.Columns[1].ColumnName = "群分類名稱"; //Dt.Columns[2].ColumnName = "大分類"; //Dt.Columns[3].ColumnName = "大分類名稱"; //Dt.Columns[4].ColumnName = "中分類"; //Dt.Columns[5].ColumnName = "中分類名稱"; //Dt.Columns[6].ColumnName = "小分類"; //Dt.Columns[7].ColumnName = "小分類名稱"; //Dt.Columns[8].ColumnName = "商品"; //Dt.Columns[9].ColumnName = "商品名稱"; //Dt.Columns[10].ColumnName = "刊別"; //Dt.Columns[11].ColumnName = "進貨數量 "; //Dt.Columns[12].ColumnName = "退貨數量"; //Dt.Columns[13].ColumnName = "實銷數量"; //Dt.Columns[14].ColumnName = "進貨牌價"; //Dt.Columns[15].ColumnName = "退貨牌價"; //Dt.Columns[16].ColumnName = "時銷牌價"; //Dt.Columns[17].ColumnName = "進貨成本"; //Dt.Columns[18].ColumnName = "退貨成本"; //Dt.Columns[19].ColumnName = "時銷成本"; //Dt.Columns[20].ColumnName = "進貨零售價"; //Dt.Columns[21].ColumnName = "退貨零售價"; //Dt.Columns[22].ColumnName = "時銷零售價"; #endregion EOT = ReportList.ExcelOtherType.None; } return Dt; #endregion }
public void TestList() { ReportList reportList = Report.List("shipment"); Assert.AreNotEqual(0, reportList.reports.Count); ReportList nextReportList = reportList.Next(); Assert.AreNotEqual(reportList.reports[0].id, nextReportList.reports[0].id); }
/// <summary> /// MKT10報表 /// </summary> /// <param name="ParameterList">變數清單</param> /// <param name="ReportOutputFormat">報表格式(PDF,EXCEL)</param> /// <param name="EOT">匯出Excel方式</param> /// <returns>回傳查詢結果</returns> public DataTable MKT08_1(ArrayList ParameterList, string ReportOutputFormat, ref ReportList.ExcelOtherType EOT ) { MKTModel.MaintainSaleItem BCO = new MKTModel.MaintainSaleItem(ConntionDB); DataTable Dt = BCO.QuerySwitch(MKTModel.MaintainSaleItem.QueryType.QueryByITEM, ParameterList ); if (Dt.Rows.Count == 0) { throw new Exception("查無資料"); } //設定使用第三方元件匯出EXCEL if (ReportOutputFormat == "EXCEL") { #region 表頭 Dt.Columns[0].ColumnName = "群分類"; Dt.Columns[1].ColumnName = "群分類名稱"; Dt.Columns[2].ColumnName = "大分類"; Dt.Columns[3].ColumnName = "大分類名稱"; Dt.Columns[4].ColumnName = "中分類"; Dt.Columns[5].ColumnName = "中分類名稱"; Dt.Columns[6].ColumnName = "小分類"; Dt.Columns[7].ColumnName = "小分類名稱"; Dt.Columns[8].ColumnName = "商品"; Dt.Columns[9].ColumnName = "商品名稱"; Dt.Columns[10].ColumnName = "刊別"; Dt.Columns[11].ColumnName = "進貨數量 "; Dt.Columns[12].ColumnName = "退貨數量"; Dt.Columns[13].ColumnName = "實銷數量"; Dt.Columns[14].ColumnName = "進貨牌價"; Dt.Columns[15].ColumnName = "退貨牌價"; Dt.Columns[16].ColumnName = "時銷牌價"; Dt.Columns[17].ColumnName = "進貨成本"; Dt.Columns[18].ColumnName = "退貨成本"; Dt.Columns[19].ColumnName = "時銷成本"; Dt.Columns[20].ColumnName = "進貨零售價"; Dt.Columns[21].ColumnName = "退貨零售價"; Dt.Columns[22].ColumnName = "時銷零售價"; #endregion EOT = ReportList.ExcelOtherType.Normal; } return Dt; }
/// <summary> /// COM06報表 /// </summary> /// <param name="ParameterList">變數清單</param> /// <returns>回傳查詢結果</returns> public DataTable COM06_1(ArrayList ParameterList, string ReportOutputFormat, ref ReportList.ExcelOtherType EOT ) { COMModel.QueryQtyByStore bco = new COMModel.QueryQtyByStore(ConntionDB); DataTable Dt; if (ReportOutputFormat == "EXCEL") { if (bco.QueryByStoreCnt(ParameterList) <= 60000) Dt = bco.QueryByStore(ParameterList); else throw new Exception("資料超過60000筆,請縮小查詢範圍重新查詢"); Dt.Columns[0].ColumnName = "進貨日期"; Dt.Columns[1].ColumnName = "營業所代碼"; Dt.Columns[2].ColumnName = "營業所"; Dt.Columns[3].ColumnName = "營業人員"; Dt.Columns[4].ColumnName = "通路"; Dt.Columns[5].ColumnName = "通路名稱"; Dt.Columns[6].ColumnName = "通路進貨單"; Dt.Columns[7].ColumnName = "客戶代號"; Dt.Columns[8].ColumnName = "客戶名稱"; Dt.Columns[9].ColumnName = "高見進貨單號"; Dt.Columns[10].ColumnName = "商品對照號"; Dt.Columns[11].ColumnName = "高見品號"; Dt.Columns[12].ColumnName = "品號名稱"; Dt.Columns[13].ColumnName = "期別"; Dt.Columns[14].ColumnName = "稅別"; //Dt.Columns[14].ColumnName = "單位"; Dt.Columns[15].ColumnName = "零售"; Dt.Columns[16].ColumnName = "通路牌價"; Dt.Columns[17].ColumnName = "進貨數量"; Dt.Columns[18].ColumnName = "退書截止日"; Dt.Columns[19].ColumnName = "客戶地址"; Dt.Columns.RemoveAt(20); Dt.Columns.RemoveAt(20); Dt.Columns.RemoveAt(20); EOT = ReportList.ExcelOtherType.Normal; } else Dt = bco.QueryByStore(ParameterList); if (Dt.Rows.Count == 0) { throw new Exception("查無資料"); } else { return Dt; } }
/// <summary> /// VGI08_2報表(列印鈕)2010/07/28 modified /// </summary> /// <param name="ParameterList">變數清單</param> /// <returns>回傳查詢結果</returns> public DataTable VGI08_2(ArrayList ParameterList, string ReportOutputFormat, ref ReportList.ExcelOtherType EOT) { #region VGIModel.PrintAcceptPicture BCO = new VGIModel.PrintAcceptPicture(ConntionDB); DataTable Dt = BCO.QueryPrintAcceptPicture2(ParameterList); if (Dt.Rows.Count == 0) { throw new Exception("查無資料"); } string strDefaultPath = ""; //this.txt_PageStatus.Text = "PRINT"; Dt.Columns.Add("IMG_FILE", System.Type.GetType("System.Byte[]")); foreach (DataRow dr in Dt.Rows) { FileStream fs; BinaryReader br; strDefaultPath = ParameterList[11].ToString() + dr["Cover_File"].ToString(); try { fs = new FileStream(strDefaultPath, FileMode.Open, FileAccess.Read); br = new BinaryReader(fs); byte[] imgbyte = new byte[fs.Length + 1]; imgbyte = br.ReadBytes(Convert.ToInt32((fs.Length))); dr["IMG_FILE"] = imgbyte; fs.Close(); } catch (Exception ex) { //throw new Exception("錯誤訊息:" + dr["Cover_File"].ToString() + "圖檔不存在!! 路徑 : " + strDefaultPath); } } //設定使用第三方元件匯出EXCEL if (ReportOutputFormat == "EXCEL") { EOT = ReportList.ExcelOtherType.None; } return Dt; #endregion }
/// <summary> /// 產生CGD16第二張報表_模板(圖形32以內) /// </summary> /// <param name="ParameterList">查詢DB的參數</param> /// <returns>回傳查詢結果</returns> public DataTable GGD16_2(ArrayList ParameterList, string ReportOutputFormat, ref ReportList.ExcelOtherType EOT) { string strDefaultPath = ""; CGDModel.ProcessTemplateItemPrint BCO = new CGDModel.ProcessTemplateItemPrint(ConntionDB); DataTable Dt = BCO.QuerySwitch(CGDModel.CGDCommon.QueryType.QueryTemplateItemPic, ParameterList); Dt.Columns.Add("IMG_FILE", System.Type.GetType("System.Byte[]")); if (Dt.Rows.Count == 0) { throw new Exception("模板(圖形32以內)查無資料"); } else { foreach (DataRow dr in Dt.Rows) { try { FileStream fs; BinaryReader br; strDefaultPath = ParameterList[5].ToString() + dr["Cover_File"].ToString(); fs = new FileStream(strDefaultPath, FileMode.Open, FileAccess.Read); br = new BinaryReader(fs); byte[] imgbyte = new byte[fs.Length + 1]; imgbyte = br.ReadBytes(Convert.ToInt32((fs.Length))); dr["IMG_FILE"] = imgbyte; fs.Close(); } catch (Exception ex) { } } } //設定使用第三方元件匯出EXCEL if (ReportOutputFormat == "EXCEL") { EOT = ReportList.ExcelOtherType.None; } return Dt; }
/// <summary> /// 產生CGD05第三張報表_依路線 /// </summary> /// <param name="ParameterList">查詢DB的參數</param> /// <returns>回傳查詢結果</returns> public DataTable TRN05_3(ArrayList ParameterList, string ReportOutputFormat, ref ReportList.ExcelOtherType EOT) { PIC.VDS2G.LGT.TRN.PrintRestrainItem bco = new PIC.VDS2G.LGT.TRN.PrintRestrainItem(ConntionDB); DataTable Dt = bco.QueryByRoute(ParameterList); if (Dt.Rows.Count == 0) { throw new Exception("查無資料"); } //設定使用第三方元件匯出EXCEL if (ReportOutputFormat == "EXCEL") { EOT = ReportList.ExcelOtherType.None; } return Dt; }
/// <summary> /// COM01報表 /// </summary> /// <param name="ParameterList">變數清單</param> /// <returns>回傳查詢結果</returns> public DataTable COM01_1(ArrayList ParameterList, string ReportOutputFormat, ref ReportList.ExcelOtherType EOT ) { COMModel.QuerySalesByProfitCenter bco = new COMModel.QuerySalesByProfitCenter(ConntionDB); DataTable Dt = bco.QueryAllDataBySearch(ParameterList); if (Dt.Rows.Count == 0) { throw new Exception("查無資料"); } else { return Dt; } }
/// <summary> /// CGR05報表 /// </summary> /// <param name="ParameterList">變數清單</param> /// <returns>回傳查詢結果</returns> public DataTable CGR08_0(ArrayList ParameterList, string ReportOutputFormat, ref ReportList.ExcelOtherType EOT ) { CGRModel.PrintSorterDetl bco = new CGRModel.PrintSorterDetl(ConntionDB); DataTable Dt = bco.GetSorterRptData(ParameterList); if (Dt.Rows.Count == 0) { throw new Exception("查無資料"); } else { return Dt; } }
/// <summary> /// COM07報表 /// </summary> /// <param name="ParameterList">變數清單</param> /// <returns>回傳查詢結果</returns> public DataTable COM15_1(ArrayList ParameterList, string ReportOutputFormat, ref ReportList.ExcelOtherType EOT ) { COMModel.COM15_BCO bco = new COMModel.COM15_BCO(ConntionDB); DataTable Dt = bco.QuerySalesReport(ParameterList); if (Dt.Rows.Count == 0) { throw new Exception("查無資料"); } else { return Dt; } }
/// <summary> /// COM05報表 /// </summary> /// <param name="ParameterList">變數清單</param> /// <returns>回傳查詢結果</returns> public string COM05_1(ArrayList ParameterList, string ReportOutputFormat, ref ReportList.ExcelOtherType EOT ) { COMModel.QueryNonQtyByStore bco = new COMModel.QueryNonQtyByStore(ConntionDB); DataTable Dt = bco.QueryByStore(ParameterList); if (Dt.Rows.Count == 0) { throw new Exception("查無資料"); } else { return ExportCSV(Dt); } }
/// <summary> /// 產生CGD19第一張報表_門市報表(套表) /// </summary> /// <param name="ParameterList">查詢DB的參數</param> /// <returns>回傳查詢結果</returns> public DataTable VGI07_1(ArrayList ParameterList, string ReportOutputFormat, ref ReportList.ExcelOtherType EOT) { PIC.VDS2G.LGT.VGI.PrintAcceptDetail bco = new PIC.VDS2G.LGT.VGI.PrintAcceptDetail(ConntionDB); DataTable Dt = bco.QueryPrintAcceptDetail(ParameterList); if (Dt.Rows.Count == 0) { throw new Exception("查無資料"); } //設定使用第三方元件匯出EXCEL if (ReportOutputFormat == "EXCEL") { EOT = ReportList.ExcelOtherType.None; } return Dt; }
/// <summary> /// TRN07_2報表(匯出鈕) /// </summary> /// <param name="ParameterList">變數清單</param> /// <param name="ReportOutputFormat">報表格式(PDF,EXCEL)</param> /// <param name="EOT">匯出Excel方式</param> /// <returns>回傳查詢結果</returns> public DataTable TRN07_2(ArrayList ParameterList, string ReportOutputFormat, ref ReportList.ExcelOtherType EOT ) { TRNModel.PrintTransAndDriver BCO = new PIC.VDS2G.LGT.TRN.PrintTransAndDriver(ConntionDB); DataTable Dt = BCO.PrintDriver(ParameterList); if (Dt.Rows.Count == 0) { throw new Exception("查無資料"); } EOT = ReportList.ExcelOtherType.None; return Dt; }
/// <summary> /// COM02營業人員報表 /// </summary> /// <param name="ParameterList">變數清單</param> /// <returns>回傳查詢結果</returns> public DataTable COM02_3(ArrayList ParameterList, string ReportOutputFormat, ref ReportList.ExcelOtherType EOT ) { COMModel.QuerySalesBySaleDep bco = new COMModel.QuerySalesBySaleDep(ConntionDB); DataTable Dt = bco.QueryBySalesPerson(ParameterList); if (Dt.Rows.Count == 0) { throw new Exception("查無資料"); } else { Dt = computeData(Dt); return Dt; } }
/// <summary> /// VGI08_1報表(列印鈕) /// </summary> /// <param name="ParameterList">變數清單</param> /// <returns>回傳查詢結果</returns> public DataSet VGI09_1(ArrayList ParameterList, string ReportOutputFormat, ref ReportList.ExcelOtherType EOT) { #region VGIModel.PrintAcceptQuality BCO = new VGIModel.PrintAcceptQuality(ConntionDB); DataSet Ds = BCO.PringAcceptQualityData(ParameterList); DataTable Dt = Ds.Tables[0]; if (Dt.Rows.Count == 0) { throw new Exception("查無資料"); } else { int iPos = 0; while (iPos < Dt.Rows.Count) { DataRow drMyRow = null; drMyRow = Dt.NewRow(); drMyRow["VENDOR"] = " 廠商"; drMyRow["ITEM"] = " 品號"; drMyRow["ITEM_NAME"] = " 品名"; drMyRow["PERIOD"] = " 期別"; drMyRow["Accept_Qty"] = "驗收數量"; Dt.Rows.InsertAt(drMyRow, iPos); iPos = iPos + 20; } } //設定使用第三方元件匯出EXCEL if (ReportOutputFormat == "EXCEL") { EOT = ReportList.ExcelOtherType.None; } return Ds; #endregion }
/// <summary> /// CRM15_1報表(匯出鈕) /// </summary> /// <param name="ParameterList">變數清單</param> /// <param name="ReportOutputFormat">報表格式(PDF,EXCEL)</param> /// <param name="EOT">匯出Excel方式</param> /// <returns>回傳查詢結果</returns> public DataTable CRM15_1(ArrayList ParameterList, string ReportOutputFormat, ref ReportList.ExcelOtherType EOT ) { CRMModel.QueryCRMOrderOutOfStockReport BCO = new CRMModel.QueryCRMOrderOutOfStockReport(ConntionDB); DataTable Dt = BCO.Export(ParameterList); if (Dt.Rows.Count == 0) { throw new Exception("查無資料"); } //設定使用第三方元件匯出EXCEL if (ReportOutputFormat == "EXCEL") { #region 表頭 //Dt.Columns[0].ColumnName = "供應商"; //Dt.Columns[1].ColumnName = "供應商名稱"; //Dt.Columns[2].ColumnName = "品號"; //Dt.Columns[3].ColumnName = "品名"; //Dt.Columns[4].ColumnName = "營業所"; //Dt.Columns[5].ColumnName = "營業所名稱"; //Dt.Columns[6].ColumnName = "通路"; //Dt.Columns[7].ColumnName = "通路名稱"; //Dt.Columns[8].ColumnName = "店號"; //Dt.Columns[9].ColumnName = "店名"; //Dt.Columns[10].ColumnName = "通路PO單號"; //Dt.Columns[11].ColumnName = "訂單日期 "; //Dt.Columns[12].ColumnName = "流水編號"; //Dt.Columns[13].ColumnName = "訂單編號"; //Dt.Columns[14].ColumnName = "營業專員名稱"; //Dt.Columns[15].ColumnName = "訂單量"; //Dt.Columns[16].ColumnName = "進貨日"; #endregion EOT = ReportList.ExcelOtherType.None; } return Dt; }
/// <summary> /// TRN23_1報表_轉運專車統計表EXCEL /// </summary> /// <param name="ParameterList">變數清單</param> /// <returns>回傳查詢結果</returns> public DataTable TRN23_1(ArrayList ParameterList, ref ReportList.ExcelOtherType EOT) { #region TRNModel.VDS_TRN23_BCO BCO = new TRNModel.VDS_TRN23_BCO(ConntionDB); DataTable Dt = BCO.PRINT_TRANS_CAR2(ParameterList); if (Dt != null && Dt.Rows.Count > 0) { EOT = ReportList.ExcelOtherType.Normal;//如要匯出EXCEL此為必要設定 return Dt; } else { throw new Exception("查無資料!!"); } #endregion }
/// <summary> /// VGR05報表 /// </summary> /// <param name="ParameterList">變數清單</param> /// <returns>回傳查詢結果</returns> public DataTable VGR05_1(ArrayList ParameterList, string ReportOutputFormat, ref ReportList.ExcelOtherType EOT ) { VGRModel.PrintChanReturnDetl bco = new VGRModel.PrintChanReturnDetl(ConntionDB); DataTable Dt = bco.GetChanReturnDetl(ParameterList); if (Dt.Rows.Count == 0) { throw new Exception("查無資料"); } //設定使用第三方元件匯出EXCEL if (ReportOutputFormat == "EXCEL") { EOT = ReportList.ExcelOtherType.None; } return Dt; }
/// <summary> /// IVM29_1報表(庫存月結報表) /// </summary> /// <param name="ParameterList">變數清單</param> /// <returns>回傳查詢結果</returns> public DataTable IVM29_1(ArrayList ParameterList, string ReportOutputFormat, ref ReportList.ExcelOtherType EOT ) { #region IVMModel.VDS_IVM29_BCO bco = new IVMModel.VDS_IVM29_BCO(ConntionDB); DataTable Dt = new DataTable(); Dt = bco.QUERY_IVM_CHECKOUT(ParameterList); if (Dt == null || Dt.Rows.Count == 0) { throw new Exception("查無資料"); } else { return Dt; } #endregion }
public DataTable VIM157_20(ArrayList ParameterList, string ReportOutputFormat, ref ReportList.ExcelOtherType EOT ) { IVMModel.MaintainPickData bco = new IVMModel.MaintainPickData(ConntionDB); DataTable Dt = new DataTable(); Dt = bco.GetPrintRpt02(ParameterList); DataView dv = new DataView(Dt); dv.Sort = "item"; if (Dt.Rows.Count == 0) { throw new Exception("查無資料"); } else { return dv.ToTable(); } }
/// <summary> /// ALO25_1報表_列印鈕 /// </summary> /// <param name="ParameterList">變數清單</param> /// <param name="ReportOutputFormat">報表格式(PDF,EXCEL)</param> /// <returns>回傳查詢結果</returns> public DataTable ALO25_1(ArrayList ParameterList, ref ReportList.ExcelOtherType EOT ) { #region ALOModel.VDS_ALO25_BCO BCO = new ALOModel.VDS_ALO25_BCO(ConntionDB); DataTable Dt = null; Dt = BCO.QueryForALO25(ParameterList); if (Dt == null || Dt.Rows.Count == 0) { throw new Exception("查無資料"); } return Dt; #endregion }
/// <summary> /// COM17_1報表_列印鈕 /// </summary> /// <param name="ParameterList">變數清單</param> /// <param name="ReportOutputFormat">報表格式(PDF,EXCEL)</param> /// <param name="EOT">匯出Excel方式</param> /// <returns>回傳查詢結果</returns> public DataTable COM17_1(ArrayList ParameterList, string ReportOutputFormat, ref ReportList.ExcelOtherType EOT ) { #region COMModel.COM17_BCO BCO = new COMModel.COM17_BCO(ConntionDB); DataTable Dt = null; Int32 i32TotalItem = 0; Dt = BCO.QueryItemSale(ParameterList, out i32TotalItem); if (Dt == null || Dt.Rows.Count == 0) { throw new Exception("查無資料"); } return Dt; #endregion }
/// <summary> /// CRM14_1報表(列印鈕)-明細表 /// </summary> /// <param name="ParameterList">變數清單</param> /// <param name="ReportOutputFormat">報表格式(PDF,EXCEL)</param> /// <param name="EOT">匯出Excel方式</param> /// <returns>回傳查詢結果</returns> public DataTable CRM14_1(ArrayList ParameterList, string ReportOutputFormat, ref ReportList.ExcelOtherType EOT ) { #region CRMModel.QueryCRMTicketReport BCO = new CRMModel.QueryCRMTicketReport(ConntionDB); DataTable Dt = null; Dt = BCO.PrintDetail(ParameterList); if (Dt == null || Dt.Rows.Count == 0) { throw new Exception("查無資料"); } return Dt; #endregion }
/// <summary> /// CRM02_1報表(匯出鈕) /// </summary> /// <param name="ParameterList">變數清單</param> /// <param name="ReportOutputFormat">報表格式(PDF,EXCEL)</param> /// <param name="EOT">匯出Excel方式</param> /// <returns>回傳查詢結果</returns> public DataTable CRM02_1(ArrayList ParameterList, string ReportOutputFormat, ref ReportList.ExcelOtherType EOT ) { #region CRMModel.QueryCRMTicketReport BCO = new CRMModel.QueryCRMTicketReport(ConntionDB); DataTable Dt = BCO.QueryCRMRecordAndTicketByFind(ParameterList); if (Dt == null || Dt.Rows.Count == 0) { throw new Exception("查無資料"); } //設定使用第三方元件匯出EXCEL if (ReportOutputFormat == "EXCEL") { #region 表頭 Dt.Columns[0].ColumnName = "來電日期"; Dt.Columns[1].ColumnName = "流水編號"; Dt.Columns[2].ColumnName = "客服接聽人"; Dt.Columns[3].ColumnName = "服務方式"; Dt.Columns[4].ColumnName = "類別"; Dt.Columns[5].ColumnName = "問題說明"; Dt.Columns[6].ColumnName = "處理人員"; Dt.Columns[7].ColumnName = "結案日期"; Dt.Columns[8].ColumnName = "主管簽核日"; #endregion EOT = ReportList.ExcelOtherType.Normal; } return Dt; #endregion }