/// <summary> /// Initializes a new instance of the <see cref="DashboardController"/> class. /// </summary> /// <param name="reportService">The report service.</param> /// <param name="releaseService">The release service.</param> /// <param name="timesheetService">The timesheet service.</param> /// <param name="projectComplianceReportService">The project compliance report service.</param> /// <param name="projectService">The project service.</param> public DashboardController(ReportService reportService, ReleaseService releaseService, TimesheetService timesheetService, ProjectComplianceReportService projectComplianceReportService, ProjectService projectService) { this.reportService = reportService; this.releaseService = releaseService; this.timesheetService = timesheetService; this.projectComplianceReportService = projectComplianceReportService; this.projectService = projectService; this.AddBreadcrumbItem(Resources.Dashboard, string.Empty); }
static async void Report() { var reportService = new ReportService("https://ebctest.cybersource.com/ebctest/", _username, _password) { MerchantId = "ucdavis_jpknoll" }; var yesterday = DateTime.Today - TimeSpan.FromDays(1); try { var report = await reportService.GetPaymentSubmissionDetail(yesterday); Console.Write(report); } catch (Exception e) { Console.Write(e.Message); } }
public virtual void Init() { WorkspaceService = new WorkspaceService(Constants.ApiToken); var workspaces = WorkspaceService.List(); ClientService = new ClientService(Constants.ApiToken); TaskService = new TaskService(Constants.ApiToken); TagService = new TagService(Constants.ApiToken); ProjectService = new ProjectService(Constants.ApiToken); UserService = new UserService(Constants.ApiToken); TimeEntryService = new TimeEntryService(Constants.ApiToken); ReportService = new ReportService(Constants.ApiToken); foreach (var workspace in workspaces) { var projects = WorkspaceService.Projects(workspace.Id.Value); var tasks = WorkspaceService.Tasks(workspace.Id.Value); var tags = WorkspaceService.Tags(workspace.Id.Value); // TODO var users = WorkspaceService.Users(workspace.Id.Value); // TODO var clients = WorkspaceService.Clients(workspace.Id.Value); var rte = new TimeEntryParams { StartDate = DateTime.Now.AddYears(-1)}; var timeEntries = TimeEntryService.List(rte); Assert.IsTrue(TimeEntryService.DeleteIfAny(timeEntries.Select(te => te.Id.Value).ToArray())); Assert.IsTrue(ProjectService.DeleteIfAny(projects.Select(p => p.Id.Value).ToArray())); Assert.IsTrue(TaskService.DeleteIfAny(tasks.Select(t => t.Id.Value).ToArray())); Assert.IsTrue(ClientService.DeleteIfAny(clients.Select(c => c.Id.Value).ToArray())); Assert.IsFalse(WorkspaceService.Projects(workspace.Id.Value).Any()); Assert.IsFalse(WorkspaceService.Tasks(workspace.Id.Value).Any()); Assert.IsFalse(WorkspaceService.Clients(workspace.Id.Value).Any()); Assert.IsFalse(TimeEntryService.List(rte).Any()); } DefaultWorkspaceId = workspaces.First().Id.Value; }
public override void OnLoad() { base.OnLoad(); ReportService report = (ReportService)dw_1.Services.Add(ServiceName.Report); report.RequestorDrawTitle = false; this.Visible = false; //dw_1.Retrieve(); //dw_1.Modify("DataWindow.Readonly=yes"); var method = "getTaxRate"; //var code = "5407520091"; var code = this.Request["code"].ToString(); //var tsflag = this.Request["tsflag"].ToString(); string strFile = AppDomain.CurrentDomain.BaseDirectory; var timestamp = Context.Timestamp.ToString("yyyy-MM-dd HH:mm:ss"); string sign = WS.MD5("hd01" + "750a8953a27a4d0aa6b4a70576574ead" + timestamp); //method = "getVisualLogistics"; string format = "xml"; string uid = "hd01"; string url = ""; //取随机数 Random rnd = new Random(); int n = rnd.Next(10000, 99999); url = "http://api.trainer.nbeport.com/router/rest?method=" + method + "&format=" + format + "&code=" + code + "&user_id=" + uid + "×tamp=" + timestamp + "&sign=" + sign + "&t=" + n; //url = Server.UrlEncode(url); //WriteTextLog(url); strFile = strFile + "XML\\" + code + ".xml"; //WS.DownLoadAndCreateXML(url, strFile); var Stream = WS.WriteCardToStream(url); //STREAM转换为string StreamReader reader = new StreamReader(Stream); string text = reader.ReadToEnd(); var row = 0; var sxrq = ""; var jsrq = ""; var insertrow = 0; var name = ""; var unit = ""; var dwcode = ""; var zssl_Set = ""; var tsl = ""; var hgbm = ""; //for (row = dw_1.RowCount; row > 0; row--) //{ // dw_1.DeleteRow(row); //} //for (row = ds_1.RowCount; row > 0; row--) //{ // ds_1.DeleteRow(row); //} ds_1.ImportString(text, Sybase.DataWindow.FileSaveAsType.Xml); if (ds_1.RowCount > 1) { //更新行号 for (row = ds_1.RowCount; row > 0; row--) { insertrow = dw_1.InsertRow(0); sxrq = ds_1.GetItemString(row, "vesselname"); jsrq = ds_1.GetItemString(row, "voyage"); name = ds_1.GetItemString(row, "hgbm"); if (sxrq != null && sxrq != "") { hgbm = ds_1.GetItemString(row + 1, "stepname"); unit = ds_1.GetItemString(row + 1, "remark"); dwcode = ds_1.GetItemString(row + 1, "ctnno"); zssl_Set = ds_1.GetItemString(row + 1, "billno"); tsl = ds_1.GetItemString(row + 1, "procresul"); } dw_1.SetItemString(insertrow, "vesselname", sxrq); dw_1.SetItemString(insertrow, "voyage", jsrq); dw_1.SetItemString(insertrow, "stepname", name); dw_1.SetItemString(insertrow, "remark", unit); dw_1.SetItemString(insertrow, "ctnno", dwcode); dw_1.SetItemString(insertrow, "procresul", tsl); dw_1.SetItemString(insertrow, "billno", zssl_Set); dw_1.SetItemString(insertrow, "hgbm", hgbm); } for (row = dw_1.RowCount; row > 0; row--) { if (dw_1.GetItemString(row, "stepname") == "" || dw_1.GetItemString(row, "stepname") == null) { dw_1.DeleteRow(row); } } } //dw_1.ImportString(text, Sybase.DataWindow.FileSaveAsType.Xml); //dw_1.Retrieve(); dw_1.Modify("DataWindow.Readonly=yes"); }
/// <remarks> /// checks if all neccessary criteria is selected and generates report by selected criteria. /// </remarks> /// <param name="sender"></param> /// <param name="e"></param> private void btnGenerateReport_Click(object sender, RoutedEventArgs e) { // set warning labels and report view to empty prior to checking lblError.Content = ""; txtReport.ItemsSource = null; ReportService reportSrv = new ReportService(); //check if both start and end date are selected, start date is not in the future and end date is later than start date // if not compliant, display warning if (startDate.SelectedDate != null && endDate.SelectedDate != null) { _startDate = (DateTime)startDate.SelectedDate; _endDate = (DateTime)endDate.SelectedDate; if (_startDate > DateTime.Now) { lblError.Content = "Alguskuupäev ei tohi olla tulevikus"; } else if (_endDate < _startDate) { lblError.Content = "Perioodi lõpp ei tohi olla varem kui algus"; } else if (_startDate <= _endDate) { // if Radio Button Customer Report is checked, generate Report by Customer for selected period if (rbtnCustomerReport.IsChecked == true && _selectedCustomer !=null) { CustomerReportBO currentReport = new CustomerReportBO((DateTime)_startDate, (DateTime)_endDate, _selectedCustomer); _output = reportSrv.getReport(currentReport); } // if Radio Button Room Report is checked, generate Report by Room for selected period else if (rbtnRoomReport.IsChecked == true && _selectedRoom != null) { RoomReportBO currentReport = new RoomReportBO((DateTime)_startDate, (DateTime)_endDate, _selectedRoom); _output = reportSrv.getReport(currentReport); } // if Radio Button Full Report is checked, generate Report by all bookings for selected period else if (rbtnFullReport.IsChecked == true) { ReportBO currentReport = new ReportBO((DateTime)_startDate, (DateTime)_endDate); _output = reportSrv.getReport(currentReport); } // if no criteria is selected else { _output = null; btnExport.IsEnabled = false; lblError.Content = "Vali aruande kriteeriumid"; } // if there are rows to display, show in txtReport ListView if (_output != null && _output.Count != 0) { txtReport.ItemsSource = _output; btnExport.IsEnabled = true; } // if no rows to display, give a warning. else if (_output != null && _output.Count == 0) { btnExport.IsEnabled = false; lblError.Content = "Päringule vastavaid kirjeid ei leitud"; } else { btnExport.IsEnabled = false; lblError.Content = "Vali aruande kriteeriumid"; } } } else { lblError.Content = "Vali periood"; } }
/// <summary> /// Initializes a new instance of the <see cref="ProjectDashboardController"/> class. /// </summary> /// <param name="projectService">The project service.</param> /// <param name="projectHourReportService">The project hour report service.</param> /// <param name="releaseService">The release service.</param> /// <param name="projectArtifactService">The project artifact service.</param> /// <param name="lookupService">The lookup service.</param> /// <param name="teamEngagementService">The team engagement service.</param> /// <param name="reportService">The report service.</param> /// <param name="developerService">The developer service.</param> /// <param name="taskService">The task service.</param> public ProjectDashboardController(ProjectService projectService, ProjectHourReportService projectHourReportService, ReleaseService releaseService, ProjectArtifactService projectArtifactService, LookupService lookupService, TeamEngagementService teamEngagementService, ReportService reportService, DeveloperService developerService, TaskService taskService) { this.projectService = projectService; this.projectHourReportService = projectHourReportService; this.releaseService = releaseService; this.projectArtifactService = projectArtifactService; this.lookupService = lookupService; this.teamEngagementService = teamEngagementService; this.reportService = reportService; this.developerService = developerService; this.taskService = taskService; }
/// <summary> /// Shows the readonly details. /// </summary> /// <param name="dataView">The data view.</param> private void ShowReadonlyDetails(DataView dataView) { SetEditMode(false); hfDataViewId.SetValue(dataView.Id); lReadOnlyTitle.Text = dataView.Name.FormatAsHtmlTitle(); hlblDataViewId.Text = "Id: " + dataView.Id.ToString(); if (dataView.Id == default(int) || string.IsNullOrWhiteSpace(GetAttributeValue("ReportDetailPage"))) { lbViewCreateReport.Visible = false; } lDescription.Text = dataView.Description.ConvertMarkdownToHtml(); DescriptionList descriptionListMain = new DescriptionList(); if (dataView.EntityType != null) { descriptionListMain.Add("Applies To", dataView.EntityType.FriendlyName); } if (dataView.Category != null) { descriptionListMain.Add("Category", dataView.Category.Name); } if (dataView.TransformEntityType != null) { descriptionListMain.Add("Post-filter Transformation", dataView.TransformEntityType.FriendlyName); } lblMainDetails.Text = descriptionListMain.Html; DescriptionList descriptionListFilters = new DescriptionList(); if (dataView.DataViewFilter != null && dataView.EntityTypeId.HasValue) { var entityTypeCache = EntityTypeCache.Get(dataView.EntityTypeId.Value); if (entityTypeCache != null) { var entityTypeType = entityTypeCache.GetEntityType(); if (entityTypeType != null) { descriptionListFilters.Add("Filter", dataView.DataViewFilter.ToString(entityTypeType)); } } } lFilters.Text = descriptionListFilters.Html; DescriptionList descriptionListPersisted = new DescriptionList(); hlblPersisted.Visible = dataView.PersistedScheduleIntervalMinutes.HasValue && dataView.PersistedLastRefreshDateTime.HasValue; if (hlblPersisted.Visible) { hlblPersisted.Text = string.Format("Persisted {0}", dataView.PersistedLastRefreshDateTime.ToElapsedString()); } lPersisted.Text = descriptionListPersisted.Html; DescriptionList descriptionListDataviews = new DescriptionList(); var dataViewFilterEntityId = EntityTypeCache.Get(typeof(Rock.Reporting.DataFilter.OtherDataViewFilter)).Id; var rockContext = new RockContext(); DataViewService dataViewService = new DataViewService(rockContext); var dataViews = dataViewService.Queryable().AsNoTracking() .Where(d => d.DataViewFilter.ChildFilters .Any(f => f.Selection == dataView.Id.ToString() && f.EntityTypeId == dataViewFilterEntityId)) .OrderBy(d => d.Name); StringBuilder sbDataViews = new StringBuilder(); var dataViewDetailPage = GetAttributeValue("DataViewDetailPage"); foreach (var dataview in dataViews) { if (!string.IsNullOrWhiteSpace(dataViewDetailPage)) { sbDataViews.Append("<a href=\"" + LinkedPageUrl("DataViewDetailPage", new Dictionary <string, string>() { { "DataViewId", dataview.Id.ToString() } }) + "\">" + dataview.Name + "</a><br/>"); } else { sbDataViews.Append(dataview.Name + "<br/>"); } } descriptionListDataviews.Add("Data Views", sbDataViews); lDataViews.Text = descriptionListDataviews.Html; DescriptionList descriptionListReports = new DescriptionList(); StringBuilder sbReports = new StringBuilder(); ReportService reportService = new ReportService(rockContext); var reports = reportService.Queryable().AsNoTracking().Where(r => r.DataViewId == dataView.Id).OrderBy(r => r.Name); var reportDetailPage = GetAttributeValue("ReportDetailPage"); foreach (var report in reports) { if (!string.IsNullOrWhiteSpace(reportDetailPage)) { sbReports.Append("<a href=\"" + LinkedPageUrl("ReportDetailPage", new Dictionary <string, string>() { { "ReportId", report.Id.ToString() } }) + "\">" + report.Name + "</a><br/>"); } else { sbReports.Append(report.Name + "<br/>"); } } descriptionListReports.Add("Reports", sbReports); lReports.Text = descriptionListReports.Html; // Group-Roles using DataView in Group Sync DescriptionList descriptionListGroupSync = new DescriptionList(); StringBuilder sbGroups = new StringBuilder(); GroupSyncService groupSyncService = new GroupSyncService(rockContext); var groupSyncs = groupSyncService .Queryable() .Where(a => a.SyncDataViewId == dataView.Id) .ToList(); var groupDetailPage = GetAttributeValue("GroupDetailPage"); if (groupSyncs.Count() > 0) { foreach (var groupSync in groupSyncs) { string groupAndRole = string.Format("{0} - {1}", (groupSync.Group != null ? groupSync.Group.Name : "(Id: " + groupSync.GroupId.ToStringSafe() + ")"), groupSync.GroupTypeRole.Name); if (!string.IsNullOrWhiteSpace(groupDetailPage)) { sbGroups.Append("<a href=\"" + LinkedPageUrl("GroupDetailPage", new Dictionary <string, string>() { { "GroupId", groupSync.GroupId.ToString() } }) + "\">" + groupAndRole + "</a><br/>"); } else { sbGroups.Append(string.Format("{0}<br/>", groupAndRole)); } } descriptionListGroupSync.Add("Groups", sbGroups); lGroups.Text = descriptionListGroupSync.Html; } ShowReport(dataView); }
/// <summary> /// Initializes a new instance of the <see cref="ReportUtilities"/> /// class. /// </summary> /// <param name="reportService">ReportService to be used</param> /// <param name="reportJobId">The ID of the report job</param> public ReportUtilities(ReportService reportService, long reportJobId) : base(reportService.User) { this.reportService = reportService; this.reportJobId = reportJobId; }
/// <summary> /// Run the code example. /// </summary> public void Run(DfpUser user) { using (ReportService reportService = (ReportService)user.GetService( DfpService.v201802.ReportService)) { // Set the file path where the report will be saved. String filePath = _T("INSERT_FILE_PATH_HERE"); long orderId = long.Parse(_T("INSERT_ORDER_ID_HERE")); // Create report job. ReportJob reportJob = new ReportJob(); reportJob.reportQuery = new ReportQuery(); reportJob.reportQuery.dimensions = new Dimension[] { Dimension.ORDER_ID, Dimension.ORDER_NAME }; reportJob.reportQuery.dimensionAttributes = new DimensionAttribute[] { DimensionAttribute.ORDER_TRAFFICKER, DimensionAttribute.ORDER_START_DATE_TIME, DimensionAttribute.ORDER_END_DATE_TIME }; reportJob.reportQuery.columns = new Column[] { Column.AD_SERVER_IMPRESSIONS, Column.AD_SERVER_CLICKS, Column.AD_SERVER_CTR, Column.AD_SERVER_CPM_AND_CPC_REVENUE, Column.AD_SERVER_WITHOUT_CPD_AVERAGE_ECPM }; // Set a custom date range for the last 8 days reportJob.reportQuery.dateRangeType = DateRangeType.CUSTOM_DATE; System.DateTime endDateTime = System.DateTime.Now; reportJob.reportQuery.startDate = DateTimeUtilities.FromDateTime(endDateTime.AddDays(-8), "America/New_York").date; reportJob.reportQuery.endDate = DateTimeUtilities.FromDateTime(endDateTime, "America/New_York").date; // Create statement object to filter for an order. StatementBuilder statementBuilder = new StatementBuilder() .Where("ORDER_ID = :id") .AddValue("id", orderId); reportJob.reportQuery.statement = statementBuilder.ToStatement(); try { // Run report job. reportJob = reportService.runReportJob(reportJob); ReportUtilities reportUtilities = new ReportUtilities(reportService, reportJob.id); // Set download options. ReportDownloadOptions options = new ReportDownloadOptions(); options.exportFormat = ExportFormat.CSV_DUMP; options.useGzipCompression = true; reportUtilities.reportDownloadOptions = options; // Download the report. using (ReportResponse reportResponse = reportUtilities.GetResponse()) { reportResponse.Save(filePath); } Console.WriteLine("Report saved to \"{0}\".", filePath); } catch (Exception e) { Console.WriteLine("Failed to run delivery report. Exception says \"{0}\"", e.Message); } } }
public ActionResult List() { List <ReportModel> reports = ReportService.GetReports(null, User); return(View(reports)); }
public override void OnLoad() { base.OnLoad(); //系统模块编码 ReportService report = (ReportService)this.dw_list.Services.Add(ServiceName.Report); report.RequestorDrawTitle = false; var userid = AppService.GetUserID(); var username = AppService.GetUserName(); var ShareMode = AppService.GetShareMode(); var Dlwtf = AppService.GetDlwtf(); var Tybm = AppService.GetTybm(); var Sfqytybm = AppService.GetSfqytybm(); this.SetParm("userid", userid); this.SetParm("username", username); this.SetParm("ShareMode", ShareMode); this.SetParm("Dlwtf", Dlwtf); this.SetParm("Tybm", Tybm); this.SetParm("Sfqytybm", Sfqytybm); // 数据分页检索,必须在数据检索之前设置 //this.dw_list.PageSize = 50; //每页检索50条记录 DataWindowChild dwc = dw_list.GetChild("zbr"); dwc.SetTransaction(this.AdoTransaction); dwc.Retrieve(""); //dwc = dw_list.GetChild("zdr"); //dwc.SetTransaction(this.AdoTransaction); //dwc.Retrieve(""); //dwc = dw_list.GetChild("dz_zdy"); //dwc.SetTransaction(this.AdoTransaction); //dwc.Retrieve(""); //dwc = dw_list.GetChild("yw_Kptzs_dzjh_zdy"); //dwc.SetTransaction(this.AdoTransaction); //dwc.Retrieve(""); this.ds_1.DataWindowObject = "d_sys_modules_all"; this.ds_1.Retrieve(); this.ds_2.DataWindowObject = "dw_xtdm_area2"; this.ds_2.Retrieve(); ddlb_ctr_area2.Items.Add("全部"); for (int row = 1; row <= this.ds_2.RowCount; row++) { var ctr_area2 = this.ds_2.GetItemString(row, "ctr_area2"); ddlb_ctr_area2.Items.Add(ctr_area2); } var node = "000171"; var li_row = this.ds_1.FindRow("id='" + node + "'", 1, this.ds_1.RowCount); var role_no = this.ds_1.GetItemString(li_row, "role_no"); DateTime date = System.DateTime.Now.AddDays(-90); this.dp_begin.Value = date; ds_role.Retrieve(userid, role_no); if (ds_role.RowCount > 0) { btn_new.Visible = true; btn_duplicate.Visible = true; btn_delete.Visible = true; this.SetParm("operation", "open"); dw_list.Modify("DataWindow.Readonly=no"); } else { btn_new.Visible = false; btn_duplicate.Visible = false; btn_delete.Visible = false; this.SetParm("operation", "show"); dw_list.Modify("DataWindow.Readonly=yes"); } ds_role_kybmjl.Retrieve(userid, "076"); if (ds_role_kybmjl.RowCount > 0) { this.SetParm("kybmjl", "Y"); btn_zgggbz.Visible = true; } else { this.SetParm("kybmjl", "N"); btn_zgggbz.Visible = false; } ds_role_hybmjl.Retrieve(userid, "077"); if (ds_role_hybmjl.RowCount > 0) { this.SetParm("hybmjl", "Y"); } else { this.SetParm("hybmjl", "N"); } //接单人 this.ds_3.DataWindowObject = "d_sys_userroles_wldw"; this.ds_3.Retrieve(userid); this.ddlb_jdrjc.Items.Add("全部"); for (var row = 1; row <= this.ds_3.RowCount; row++) { this.ddlb_jdrjc.Items.Add(this.ds_3.GetItemString(row, "dwjc")); } ////接单人 //this.ds_2.DataWindowObject = "d_sys_userroles_wldw"; //this.ds_2.Retrieve(userid); //this.ddlb_jdr.Items.Add("全部"); //for (int row = 1; row <= this.ds_2.RowCount; row++) //{ // var ctr_area2 = this.ds_2.GetItemString(row, "dwjc"); // this.ddlb_jdr.Items.Add(ctr_area2); //} // 数据检索 this.dw_list.Retrieve(userid, DateTime.Parse(this.dp_begin.Value.ToString()), DateTime.Parse(this.dp_end.Value.ToString()), "zj", "未靠港", Dlwtf, "单证", Tybm, Sfqytybm, "全部", "N", "全部"); ds_role.Retrieve(userid, "hddz"); dw_log.Retrieve(userid, "kylb"); //注册相关的js文件 this.RegisterClientScriptInclude("ExtPB_Demo", "/Beta3/ExtPB_Demo.js"); this.RegisterClientScriptInclude("W_HddzList_Ky", "/Hddz/W_HddzList_Ky.win.js"); this.RegisterClientScriptInclude("W_HddzEdit_Ky", "/Hddz/W_HddzEdit_Ky.win.js"); this.RegisterClientScriptInclude("W_Hddz_Beizhu", "/Hddz/W_Hddz_Beizhu.win.js"); this.RegisterClientScriptInclude("W_Hddz_Edit_Yflr", "/Hddz/W_Hddz_Edit_Yflr.win.js"); this.RegisterClientScriptInclude("W_Hddz_Dzsd", "/Hddz/W_Hddz_Dzsd.win.js"); this.RegisterClientScriptInclude("W_Hddz_Ycyy", "/Hddz/W_Hddz_Ycyy.win.js"); this.RegisterClientScriptInclude("W_Fj_Edit", "/Hddz/W_Fj_Edit.win.js"); this.RegisterClientScriptInclude("W_Wldw_Select", "/Xt_Popwin/W_Wldw_Select.win.js"); this.RegisterClientScriptInclude("W_Main1", "/Hddz/W_Main1.win.js"); this.RegisterClientScriptInclude("W_Wldw_Lxr_Select", "/Xt_Popwin/W_Wldw_Lxr_Select.win.js"); this.RegisterClientScriptInclude("W_Wldw_Shdz_Select", "/Xt_Popwin/W_Wldw_Shdz_Select.win.js"); this.RegisterClientScriptInclude("W_WldwAdd_Lxr_New", "/Xt_Popwin/W_WldwAdd_Lxr_New.win.js"); this.RegisterClientScriptInclude("W_Hddz_Zqhc", "/Hddz/W_Hddz_Zqhc.win.js"); this.RegisterClientScriptInclude("W_FtpEdit", "/pdfwj/W_FtpEdit.win.js"); this.RegisterClientScriptInclude("W_Filter", "/Hddz/W_Filter.win.js"); this.RegisterClientScriptInclude("W_FileWindow", "/Hddz/W_FileWindow.win.js"); //this.RegisterClientScriptInclude("W_Test", "/Hddz/W_Test.win.js"); //注册需要使用的弹出窗口的事件处理程序的JS文件 this.RegisterClientScriptInclude("W_Index", "W_Index.win.js"); AjaxPro.Utility.RegisterTypeForAjax(typeof(PubMethod)); }
public override void OnLoad() { base.OnLoad(); //系统模块编码 ReportService report = (ReportService)this.dw_list.Services.Add(ServiceName.Report); report.RequestorDrawTitle = false; var userid = AppService.GetUserID(); var username = AppService.GetUserName(); var ShareMode = AppService.GetShareMode(); var Dlwtf = AppService.GetDlwtf(); var Tybm = AppService.GetTybm(); var Sfqytybm = AppService.GetSfqytybm(); this.SetParm("userid", userid); this.SetParm("username", username); this.SetParm("ShareMode", ShareMode); this.SetParm("Dlwtf", Dlwtf); this.SetParm("Tybm", Tybm); this.SetParm("Sfqytybm", Sfqytybm); // 数据分页检索,必须在数据检索之前设置 //this.dw_list.PageSize = 50; //每页检索50条记录 //DataWindowChild dwc = dw_list.GetChild("ywy"); //dwc.SetTransaction(this.AdoTransaction); //dwc.Retrieve(""); //dwc = dw_list.GetChild("zdr"); //dwc.SetTransaction(this.AdoTransaction); //dwc.Retrieve(""); //dwc = dw_list.GetChild("dz_zdy"); //dwc.SetTransaction(this.AdoTransaction); //dwc.Retrieve(""); //dwc = dw_list.GetChild("yw_Kptzs_dzjh_zdy"); //dwc.SetTransaction(this.AdoTransaction); //dwc.Retrieve(""); this.ds_1.DataWindowObject = "d_sys_modules_all"; this.ds_1.Retrieve(); var node = "000142"; var li_row = this.ds_1.FindRow("id='" + node + "'", 1, this.ds_1.RowCount); DateTime date = System.DateTime.Now.AddDays(-180); this.dp_begin.Value = date; //接单人 this.ds_2.DataWindowObject = "d_sys_userroles_wldw"; this.ds_2.Retrieve(userid); this.ddlb_jdrjc.Items.Add("全部"); for (int i = 1; i <= this.ds_2.RowCount; i++) { this.ddlb_jdrjc.Items.Add(this.ds_2.GetItemString(i, "dwjc")); } // 数据检索 this.dw_list.Retrieve(DateTime.Parse(this.dp_begin.Value.ToString()), DateTime.Parse(this.dp_end.Value.ToString()), "已到港未放行", Dlwtf, Tybm, Sfqytybm, userid, "全部"); //注册相关的js文件 this.RegisterClientScriptInclude("ExtPB_Demo", "/Beta3/ExtPB_Demo.js"); this.RegisterClientScriptInclude("W_HddzList_Tpcx", "/Hddz/W_HddzList_Tpcx.win.js"); this.RegisterClientScriptInclude("W_Filter", "/Hddz/W_Filter.win.js"); //注册需要使用的弹出窗口的事件处理程序的JS文件 this.RegisterClientScriptInclude("W_Index", "W_Index.win.js"); AjaxPro.Utility.RegisterTypeForAjax(typeof(PubMethod)); }
public override void OnLoad() { base.OnLoad(); //系统模块编码 ReportService report = (ReportService)this.dw_list.Services.Add(ServiceName.Report); report.RequestorDrawTitle = false; // 数据分页检索,必须在数据检索之前设置 //this.dw_list.PageSize = 50; //每页检索50条记录 this.ds_1.DataWindowObject = "d_sys_modules_all"; this.ds_1.Retrieve(); // 数据检索 var userid = AppService.GetUserID(); var li_row = this.ds_1.FindRow("id = '009003'", 1, this.ds_1.RowCount); var role_no = this.ds_1.GetItemString(li_row, "role_no"); var ShareMode = AppService.GetShareMode(); var Dlwtf = AppService.GetDlwtf(); this.SetParm("userid", userid); this.SetParm("ShareMode", ShareMode); this.SetParm("Dlwtf", Dlwtf); DataWindowChild dwc_spdl = dw_list.GetChild("spdl"); dwc_spdl.SetTransaction(this.AdoTransaction); dwc_spdl.Retrieve("%"); ds_role.Retrieve(userid, role_no); if (ds_role.RowCount > 0) { btn_new.Visible = true; btn_duplicate.Visible = true; btn_delete.Visible = true; this.SetParm("operation", "open"); } else { btn_new.Visible = false; btn_duplicate.Visible = false; btn_delete.Visible = false; this.SetParm("operation", "show"); } // 数据检索 this.dw_list.Retrieve(); //this.dw_list.Retrieve("zyxx", userid); //注册相关的js文件 this.RegisterClientScriptInclude("ExtPB_Demo", "/Beta3/ExtPB_Demo.js"); this.RegisterClientScriptInclude("W_CommodityList", "/Commodity/W_CommodityList.win.js"); this.RegisterClientScriptInclude("W_CommodityEdit", "/Commodity/W_CommodityEdit.win.js"); this.RegisterClientScriptInclude("W_CommodityAdd", "/Commodity/W_CommodityAdd.win.js"); //注册需要使用的弹出窗口的事件处理程序的JS文件 this.RegisterClientScriptInclude("W_Index", "W_Index.win.js"); AjaxPro.Utility.RegisterTypeForAjax(typeof(PubMethod)); }
public MemoryStream GetPatientHoursReportsForPeriod(int caseID, DateTime period, PatientHoursReportConfigurations configuration = PatientHoursReportConfigurations.Default) { var startDate = period; var endDate = period.AddMonths(1).AddDays(-1); var tempDir = ConfigurationManager.AppSettings["TempDirectory"]; string reportBaseName = "PatientHoursReport_"; switch (configuration) { case PatientHoursReportConfigurations.SignLine: reportBaseName += "Signline_"; break; case PatientHoursReportConfigurations.SupervisingBCBA: reportBaseName += "SupervisingBCBA_"; break; } var providerIDs = _context.Hours.Where(x => x.CaseID == caseID && x.Date >= startDate && x.Date <= endDate) .Select(x => x.ProviderID) .Distinct() .ToArray(); var files = new List <string>(); foreach (int providerID in providerIDs) { XtraReport report; switch (configuration) { case PatientHoursReportConfigurations.SignLine: report = ReportService.GetPatientHoursReportWithSignLine(caseID, startDate, endDate, providerID); break; case PatientHoursReportConfigurations.SupervisingBCBA: report = ReportService.GetPatientHoursReportWithSupervisingBCBA(caseID, startDate, endDate, providerID); break; default: report = ReportService.GetPatientHoursReport(caseID, startDate, endDate, providerID); break; } using (var stream = new MemoryStream()) { var filename = Path.Combine(tempDir, reportBaseName + caseID + "_" + providerID + "_" + startDate.ToString("yyyyMMddHHmmss") + ".pdf"); if (File.Exists(filename)) { File.Delete(filename); } report.ExportToPdf(filename); files.Add(filename); } } // merge the files var targetPath = Path.Combine(tempDir, reportBaseName + caseID + "_" + startDate.ToString("yyyyMMddHHmmss") + ".pdf"); if (File.Exists(targetPath)) { File.Delete(targetPath); } MergePDFs(targetPath, files.ToArray()); using (var stream = new MemoryStream()) { var docBytes = File.ReadAllBytes(targetPath); stream.Write(docBytes, 0, docBytes.Length); return(stream); } }
/// <summary> /// Run the code example. /// </summary> public void Run(AdManagerUser user) { using (ReportService reportService = user.GetService <ReportService>()) using (NetworkService networkService = user.GetService <NetworkService>()) { // Set the file path where the report will be saved. String filePath = _T("INSERT_FILE_PATH_HERE"); // Get the root ad unit ID to filter on. String rootAdUnitId = networkService.getCurrentNetwork().effectiveRootAdUnitId; // Create statement to filter on an ancestor ad unit with the root ad unit ID to // include all ad units in the network. StatementBuilder statementBuilder = new StatementBuilder() .Where("PARENT_AD_UNIT_ID = :parentAdUnitId") .AddValue("parentAdUnitId", long.Parse(rootAdUnitId)); // Create report query. ReportQuery reportQuery = new ReportQuery(); reportQuery.dimensions = new Dimension[] { Dimension.AD_UNIT_ID, Dimension.AD_UNIT_NAME }; reportQuery.columns = new Column[] { Column.AD_SERVER_IMPRESSIONS, Column.AD_SERVER_CLICKS, Column.DYNAMIC_ALLOCATION_INVENTORY_LEVEL_IMPRESSIONS, Column.DYNAMIC_ALLOCATION_INVENTORY_LEVEL_CLICKS, Column.TOTAL_INVENTORY_LEVEL_IMPRESSIONS, Column.TOTAL_INVENTORY_LEVEL_CPM_AND_CPC_REVENUE }; // Set the filter statement. reportQuery.statement = statementBuilder.ToStatement(); reportQuery.adUnitView = ReportQueryAdUnitView.HIERARCHICAL; reportQuery.dateRangeType = DateRangeType.LAST_WEEK; // Create report job. ReportJob reportJob = new ReportJob(); reportJob.reportQuery = reportQuery; try { // Run report. reportJob = reportService.runReportJob(reportJob); ReportUtilities reportUtilities = new ReportUtilities(reportService, reportJob.id); // Set download options. ReportDownloadOptions options = new ReportDownloadOptions(); options.exportFormat = ExportFormat.CSV_DUMP; options.useGzipCompression = true; reportUtilities.reportDownloadOptions = options; // Download the report. using (ReportResponse reportResponse = reportUtilities.GetResponse()) { reportResponse.Save(filePath); } Console.WriteLine("Report saved to \"{0}\".", filePath); } catch (Exception e) { Console.WriteLine("Failed to run inventory report. Exception says \"{0}\"", e.Message); } } }
public override void OnLoad() { base.OnLoad(); ReportService report = (ReportService)dw_1.Services.Add(ServiceName.Report); report.RequestorDrawTitle = false; var khlx = ""; var fgflx = ""; var czd_jsdwbm = ""; var czd_jdrbm = ""; var userid = AppService.GetUserID(); var ShareMode = AppService.GetShareMode(); var Dlwtf = AppService.GetDlwtf(); khlx = this.Request["khlx"]; fgflx = this.Request["fgflx"]; czd_jsdwbm = this.Request["czd_jsdwbm"]; czd_jdrbm = this.Request["czd_jdrbm"]; this.SetParm("khlx", khlx); this.SetParm("fgflx", fgflx); this.SetParm("userid", userid); this.SetParm("ShareMode", ShareMode); this.SetParm("Dlwtf", Dlwtf); if (!string.IsNullOrEmpty(czd_jsdwbm)) { this.SetParm("czd_jsdwbm", czd_jsdwbm); } if (!string.IsNullOrEmpty(czd_jdrbm)) { this.SetParm("czd_jdrbm", czd_jdrbm); } if (khlx == "gwgys" || khlx == "cgsorhkgs" || khlx == "cdorhd" || khlx == "dc") { btn_Add.Visible = true; } else { btn_Add.Visible = false; }; if (fgflx == "hdgs") { fgflx = "货代公司"; } if (fgflx == "bggs") { fgflx = "报关公司"; } if (khlx == null || khlx == "") { khlx = "全部"; dw_1.Retrieve(ShareMode, userid, Dlwtf, khlx, "Y"); } else if (khlx == "gwgys") { khlx = "国外供应商"; dw_1.Retrieve(ShareMode, userid, Dlwtf, khlx, "Y"); } else if (khlx == "wts") { khlx = "委托商"; dw_1.Retrieve(ShareMode, userid, Dlwtf, khlx, "Y"); } else if (khlx == "gncgs") { khlx = "国内采购商"; dw_1.Retrieve(ShareMode, userid, Dlwtf, khlx, "Y"); } else if (khlx == "wmgs") { khlx = "外贸公司"; dw_1.Retrieve(ShareMode, userid, Dlwtf, khlx, "Y"); } else if (khlx == "hdgs") { khlx = "货代公司"; dw_1.Retrieve(ShareMode, userid, Dlwtf, khlx, "Y"); } else if (khlx == "bggs") { khlx = "报关公司"; dw_1.Retrieve(ShareMode, userid, Dlwtf, khlx, "Y"); } else if (khlx == "bjgs") { khlx = "报检公司"; dw_1.Retrieve(ShareMode, userid, Dlwtf, khlx, "Y"); } else if (khlx == "yh") { khlx = "银行"; dw_1.Retrieve(ShareMode, userid, Dlwtf, khlx, "Y"); } else if (khlx == "hg") { khlx = "海关"; dw_1.Retrieve(ShareMode, userid, Dlwtf, khlx, "Y"); } else if (khlx == "jyd") { khlx = "检疫点"; dw_1.Retrieve(ShareMode, userid, Dlwtf, khlx, "Y"); } else if (khlx == "cxd") { khlx = "拆箱点"; dw_1.Retrieve(ShareMode, userid, Dlwtf, khlx, "Y"); } else if (khlx == "jy_jyd") { //var jyjsjjgdm = this.Request["jyjsjjgdm"]; //this.SetParm("jyjsjjgdm", jyjsjjgdm); khlx = "检疫点"; dw_1.Retrieve(ShareMode, userid, Dlwtf, khlx, "Y"); //dw_1.SetFilter("sjjgdm = '" + jyjsjjgdm + "'"); //dw_1.Filter(); } else if (khlx == "jy_mrjyd") { //var jyjsjjgdm = this.Request["jyjsjjgdm"]; //this.SetParm("jyjsjjgdm", jyjsjjgdm); khlx = "检疫点"; dw_1.Retrieve(ShareMode, userid, Dlwtf, khlx, "Y"); //dw_1.SetFilter("sjjgdm = '" + jyjsjjgdm + "'"); //dw_1.Filter(); } else if (khlx == "jyj") { khlx = "检疫局"; dw_1.Retrieve(ShareMode, userid, Dlwtf, khlx, "Y"); } else if (khlx == "jyfwgs") { khlx = "检疫服务公司"; dw_1.Retrieve(ShareMode, userid, Dlwtf, khlx, "Y"); } else if (khlx == "cgsorhkgs") { khlx = "船公司航空公司"; dw_1.Retrieve(ShareMode, userid, Dlwtf, khlx, "Y"); } else if (khlx == "cdorhd") { khlx = "船代航代"; dw_1.Retrieve(ShareMode, userid, Dlwtf, khlx, "Y"); } else if (khlx == "cd") { khlx = "车队"; dw_1.Retrieve(ShareMode, userid, Dlwtf, khlx, "Y"); } else if (khlx == "mt") { khlx = "码头"; dw_1.Retrieve(ShareMode, userid, Dlwtf, khlx, "Y"); } else if (khlx == "hymt") { khlx = "海运码头"; dw_1.Retrieve(ShareMode, userid, Dlwtf, khlx, "Y"); } else if (khlx == "cgsfxd") { khlx = "船公司放箱点"; dw_1.Retrieve(ShareMode, userid, Dlwtf, khlx, "Y"); } else if (khlx == "dc") { khlx = "堆场"; dw_1.Retrieve(ShareMode, userid, Dlwtf, khlx, "Y"); } else if (khlx == "fxgs") { khlx = "放箱公司"; dw_1.Retrieve(ShareMode, userid, Dlwtf, khlx, "Y"); } else if (khlx == "hgcyd") { khlx = "海关查验点"; dw_1.Retrieve(ShareMode, userid, Dlwtf, khlx, "Y"); } else if (khlx == "sc") { khlx = "市场"; dw_1.Retrieve(ShareMode, userid, Dlwtf, khlx, "Y"); } else if (khlx == "zjs") { khlx = "中间商"; dw_1.Retrieve(ShareMode, userid, Dlwtf, khlx, "Y"); } else if (khlx == "gwhd") { khlx = "国外货代"; dw_1.Retrieve(ShareMode, userid, Dlwtf, khlx, "Y"); } else if (khlx == "qt") { khlx = "其他"; dw_1.Retrieve(ShareMode, userid, Dlwtf, khlx, "Y"); } else if (khlx == "cxd") { khlx = "拆箱点"; dw_1.Retrieve(ShareMode, userid, Dlwtf, khlx, "Y"); } else if (khlx == "sqr") { khlx = "申请人"; dw_1.Retrieve(ShareMode, userid, Dlwtf, khlx, "Y"); } else if (khlx == "jdr") { khlx = "接单人"; dw_1.Retrieve(ShareMode, userid, Dlwtf, khlx, "Y"); } else if (khlx == "wlgs") { khlx = "物流公司"; dw_1.Retrieve(ShareMode, userid, Dlwtf, khlx, "Y"); } else if (khlx == "all") { khlx = "全部"; dw_1.Retrieve(ShareMode, userid, Dlwtf, khlx, "Y"); } else if (khlx == "fgf") { dw_1.DataWindowObject = "dw_ywy_wldw_fgf_select"; dw_1.Retrieve(fgflx); } else if (khlx == "gnkh_tybm") { var tybm = this.Request["tybm"]; this.SetParm("tybm", tybm); dw_1.Retrieve(ShareMode, userid, Dlwtf, "全部"); dw_1.SetFilter("tybm = '" + tybm + "'"); dw_1.Filter(); } dw_1.Modify("DataWindow.Readonly=yes"); this.RegisterClientScriptInclude("W_WldwAdd", "/Xt_Popwin/W_WldwAdd.win.js"); this.RegisterClientScriptInclude("W_WldwAdd_New", "/Xt_Popwin/W_WldwAdd_New.win.js"); }
public BaseReportViewModel() { service = DependencyService.Get <ReportService>(); ResetDataCommand = new Command(async() => await ExecuteResetData().ConfigureAwait(false)); }
public void GetTimeEntriesByTaskId() { var task1 = TaskService.Add(new Task { IsActive = true, Name = "task1", EstimatedSeconds = 3600, WorkspaceId = DefaultWorkspaceId, ProjectId = DefaultProjectId }); Assert.IsNotNull(task1); var task2 = TaskService.Add(new Task { IsActive = true, Name = "task2", EstimatedSeconds = 3600, WorkspaceId = DefaultWorkspaceId, ProjectId = DefaultProjectId }); Assert.IsNotNull(task2); var timeEntryService = new TimeEntryService(Constants.ApiToken); for (int i = 0; i < 3; i++) { var timeEntry = new TimeEntry() { IsBillable = true, CreatedWith = "TimeEntryTestAdd", Description = "Test Desc" + DateTime.Now.Ticks, Duration = 900, Start = DateTime.Now.AddDays(-i).ToIsoDateStr(), Stop = DateTime.Now.AddDays(-i).AddMinutes(20).ToIsoDateStr(), WorkspaceId = DefaultWorkspaceId, TaskId = task1.Id }; var expTimeEntry = timeEntryService.Add(timeEntry); Assert.IsNotNull(expTimeEntry); } for (int i = 0; i < 3; i++) { var timeEntry = new TimeEntry() { IsBillable = true, CreatedWith = "TimeEntryTestAdd", Description = "Test Desc" + DateTime.Now.Ticks, Duration = 900, Start = DateTime.Now.AddDays(-i).ToIsoDateStr(), Stop = DateTime.Now.AddDays(-i).AddMinutes(20).ToIsoDateStr(), WorkspaceId = DefaultWorkspaceId, TaskId = task2.Id }; var expTimeEntry = timeEntryService.Add(timeEntry); Assert.IsNotNull(expTimeEntry); } var standardParams = new DetailedReportParams() { UserAgent = "TogglAPI.Net", WorkspaceId = DefaultWorkspaceId, Since = DateTime.Now.AddYears(-1).ToIsoDateStr(), TaskIds = string.Format("{0},{1}", task1.Id.Value, task2.Id.Value) }; var result = ReportService.Detailed(standardParams); Assert.AreEqual(result.Data.Count, 6); Assert.AreEqual(result.TotalCount, 6); standardParams.TaskIds = task1.Id.Value.ToString(); result = ReportService.Detailed(standardParams); Assert.AreEqual(result.Data.Count, 3); Assert.AreEqual(result.TotalCount, 3); }
public StickyNetRunner(ConfigService configuration, ILogger <StickyNetRunner> logger, ILoggerFactory loggerFactory, ReportService reporter) { Logger = logger; Configuration = configuration; LoggerFactory = loggerFactory; Reporter = reporter; Servers = new ConcurrentDictionary <int, IStickyServer>(); }
public ReportManager() { _reportService = new ReportService(); _crudFactory = new ReportCrudFactory(); }
public ActionResult Get(string reportName, string reportType = ReportService.defaultReportType) { var returnString = _reportService.GenerateReportAsync(reportName, reportType, ReportHelper.GetReportDs(reportName), _reportLists.GetReportList(reportName)); return(File(returnString, System.Net.Mime.MediaTypeNames.Application.Octet, $"{reportName}.{ReportService.GetReportTypeExtension(reportType)}")); }
/// <summary> /// Run the code example. /// </summary> public void Run(AdManagerUser user, long savedQueryId) { using (ReportService reportService = user.GetService <ReportService>()) { // Set the file path where the report will be saved. String filePath = _T("INSERT_FILE_PATH_HERE"); // Create statement to retrieve the saved query. StatementBuilder statementBuilder = new StatementBuilder() .Where("id = :id") .OrderBy("id ASC") .Limit(1) .AddValue("id", savedQueryId); SavedQueryPage page = reportService.getSavedQueriesByStatement(statementBuilder.ToStatement()); SavedQuery savedQuery = page.results[0]; if (!savedQuery.isCompatibleWithApiVersion) { throw new InvalidOperationException("Saved query is not compatible with this " + "API version"); } // Optionally modify the query. ReportQuery reportQuery = savedQuery.reportQuery; reportQuery.adUnitView = ReportQueryAdUnitView.HIERARCHICAL; // Create a report job using the saved query. ReportJob reportJob = new ReportJob(); reportJob.reportQuery = reportQuery; try { // Run report. reportJob = reportService.runReportJob(reportJob); ReportUtilities reportUtilities = new ReportUtilities(reportService, reportJob.id); // Set download options. ReportDownloadOptions options = new ReportDownloadOptions(); options.exportFormat = ExportFormat.CSV_DUMP; options.useGzipCompression = true; reportUtilities.reportDownloadOptions = options; // Download the report. using (ReportResponse reportResponse = reportUtilities.GetResponse()) { reportResponse.Save(filePath); } Console.WriteLine("Report saved to \"{0}\".", filePath); } catch (Exception e) { Console.WriteLine("Failed to run saved query. Exception says \"{0}\"", e.Message); } } }
public override void OnLoad() { base.OnLoad(); //系统模块编码 ReportService report = (ReportService)this.dw_list.Services.Add(ServiceName.Report); report.RequestorDrawTitle = false; var userid = AppService.GetUserID(); var username = AppService.GetUserName(); var ShareMode = AppService.GetShareMode(); var Dlwtf = AppService.GetDlwtf(); this.SetParm("userid", userid); this.SetParm("username", username); this.SetParm("ShareMode", ShareMode); this.SetParm("Dlwtf", Dlwtf); // 数据分页检索,必须在数据检索之前设置 //this.dw_list.PageSize = 50; //每页检索50条记录 //DataWindowChild dwc = dw_list.GetChild("ywy"); //dwc.SetTransaction(this.AdoTransaction); //dwc.Retrieve(""); //dwc = dw_list.GetChild("zdr"); //dwc.SetTransaction(this.AdoTransaction); //dwc.Retrieve(""); //dwc = dw_list.GetChild("dz_zdy"); //dwc.SetTransaction(this.AdoTransaction); //dwc.Retrieve(""); //dwc = dw_list.GetChild("yw_Kptzs_dzjh_zdy"); //dwc.SetTransaction(this.AdoTransaction); //dwc.Retrieve(""); this.ds_1.DataWindowObject = "d_sys_modules_all"; this.ds_1.Retrieve(); var node = "000204"; var li_row = this.ds_1.FindRow("id='" + node + "'", 1, this.ds_1.RowCount); var role_no = this.ds_1.GetItemString(li_row, "role_no"); DateTime date = System.DateTime.Now.AddDays(-30); this.dp_begin.Value = date; ds_role.Retrieve(userid, role_no); if (ds_role.RowCount > 0) { dw_list.Modify("DataWindow.Readonly=no"); this.SetParm("Readonly", "no"); } else { dw_list.Modify("DataWindow.Readonly=yes"); this.SetParm("Readonly", "yes"); } //接单人 this.ds_2.DataWindowObject = "d_sys_userroles_wldw"; this.ds_2.Retrieve(userid); this.ddlb_jdrjc.Items.Add("全部"); for (int row = 1; row <= ds_2.RowCount; row++) { this.ddlb_jdrjc.Items.Add(ds_2.GetItemString(row, "dwjc")); } // 数据检索 this.dw_list.Retrieve(DateTime.Parse(this.dp_begin.Value.ToString()), DateTime.Parse(this.dp_end.Value.ToString()), "全部", "已到港", "已放行", userid, "全部"); //注册相关的js文件 this.RegisterClientScriptInclude("ExtPB_Demo", "/Beta3/ExtPB_Demo.js"); this.RegisterClientScriptInclude("W_Hy_Mtsjrw_cd_List", "/Wlxx/W_Hy_Mtsjrw_cd_List.win.js"); this.RegisterClientScriptInclude("W_Wldw_Select", "/Xt_Popwin/W_Wldw_Select.win.js"); this.RegisterClientScriptInclude("W_Sj_Select", "/Xt_Popwin/W_Sj_Select.win.js"); this.RegisterClientScriptInclude("W_Sjmc_Select", "/Xt_Popwin/W_Sjmc_Select.win.js"); this.RegisterClientScriptInclude("W_Cj_Select", "/Xt_Popwin/W_Cj_Select.win.js"); this.RegisterClientScriptInclude("W_Hddz_Ycyy", "/Hddz/W_Hddz_Ycyy.win.js"); this.RegisterClientScriptInclude("W_Hy_cd_Wlgz", "/Wlxx/W_Hy_cd_Wlgz.win.js"); this.RegisterClientScriptInclude("W_Filter", "/Hddz/W_Filter.win.js"); this.RegisterClientScriptInclude("W_Hy_Wlgz_Rwdz", "/Xt_Popwin/W_Hy_Wlgz_Rwdz.win.js"); this.RegisterClientScriptInclude("W_Bdsbh_Select", "/Xt_Popwin/W_Bdsbh_Select.win.js"); //注册需要使用的弹出窗口的事件处理程序的JS文件 this.RegisterClientScriptInclude("W_Index", "W_Index.win.js"); AjaxPro.Utility.RegisterTypeForAjax(typeof(PubMethod)); }
public ReportController() { addmissionService = new AddmissionService(); reportService = new ReportService(); }
public override void OnLoad() { base.OnLoad(); //系统模块编码 ReportService report = (ReportService)this.dw_list.Services.Add(ServiceName.Report); report.RequestorDrawTitle = false; var userid = AppService.GetUserID(); var username = AppService.GetUserName(); var ShareMode = AppService.GetShareMode(); var Dlwtf = AppService.GetDlwtf(); this.SetParm("userid", userid); this.SetParm("username", username); this.SetParm("ShareMode", ShareMode); this.SetParm("Dlwtf", Dlwtf); this.ds_1.DataWindowObject = "d_sys_modules_all"; this.ds_1.Retrieve(); var node = "000717"; var li_row = this.ds_1.FindRow("id='" + node + "'", 1, this.ds_1.RowCount); DateTime date = DateTime.Parse(System.DateTime.Now.ToString("yyyy/01/01")); this.dp_begin.Value = date; var role_no = this.ds_1.GetItemString(li_row, "role_no"); ds_role.Retrieve(userid, role_no); if (ds_role.RowCount > 0) { dw_list.Modify("DataWindow.Readonly=no"); this.SetParm("Readonly", "no"); } else { dw_list.Modify("DataWindow.Readonly=yes"); this.SetParm("Readonly", "yes"); }; //接单人 this.ds_2.DataWindowObject = "d_sys_userroles_wldw"; this.ds_2.Retrieve(userid); this.ddlb_jdrjc.Items.Add("全部"); for (int row = 1; row <= this.ds_2.RowCount; row++) { var ctr_area2 = this.ds_2.GetItemString(row, "dwjc"); this.ddlb_jdrjc.Items.Add(ctr_area2); } // 数据检索 this.dw_list.Retrieve(DateTime.Parse(this.dp_begin.Value.ToString()), DateTime.Parse(this.dp_end.Value.ToString()), 3, "全部"); //注册相关的js文件 this.RegisterClientScriptInclude("ExtPB_Demo", "/Beta3/ExtPB_Demo.js"); this.RegisterClientScriptInclude("W_GnkhlrtjList", "/Xxcx/W_GnkhlrtjList.win.js"); this.RegisterClientScriptInclude("W_GnkhlrtjList_Mx", "/Xxcx/W_GnkhlrtjList_Mx.win.js"); this.RegisterClientScriptInclude("W_Filter", "/Hddz/W_Filter.win.js"); //注册需要使用的弹出窗口的事件处理程序的JS文件 this.RegisterClientScriptInclude("W_Index", "W_Index.win.js"); AjaxPro.Utility.RegisterTypeForAjax(typeof(PubMethod)); }
public override void OnLoad() { base.OnLoad(); //系统模块编码 ReportService report = (ReportService)dw_jzxxx.Services.Add(ServiceName.Report); report.RequestorDrawTitle = false; //DataWindowChild dwc = dw_master.GetChild("cllx"); //dwc.SetTransaction(this.AdoTransaction); //dwc.Retrieve("%"); //DataWindowChild dwc_jgfs = dw_master.GetChild("jgfs"); //dwc_jgfs.SetTransaction(this.AdoTransaction); //dwc_jgfs.Retrieve("%"); //DataWindowChild dwc_xx = dw_jzxxx.GetChild("xx"); //dwc_xx.SetTransaction(this.AdoTransaction); //dwc_xx.Retrieve("%"); //DataWindowChild dwc_xl = dw_jzxxx.GetChild("xl"); //dwc_xl.SetTransaction(this.AdoTransaction); //dwc_xl.Retrieve("%"); //DataWindowChild dwc_fybm = dw_jzxxx.GetChild("fybm"); //dwc_fybm.SetTransaction(this.AdoTransaction); //dwc_fybm.Retrieve("0103"); var operation = this.Request["operation"].ToString(); this.SetParm("operation", operation); var userid = AppService.GetUserID(); var username = AppService.GetUserName(); var ShareMode = AppService.GetShareMode(); var Dlwtf = AppService.GetDlwtf(); var userip = AppService.GetIp(); this.SetParm("userid", userid); this.SetParm("username", username); this.SetParm("ShareMode", ShareMode); this.SetParm("Dlwtf", Dlwtf); this.SetParm("userip", userip); if (this.Request["qsdbh"] != null) { var qsdbh = this.Request["qsdbh"].ToString(); this.SetParm("qsdbh", qsdbh); dw_master.Retrieve(qsdbh); dw_jzxxx.Retrieve(qsdbh); } this.RegisterClientScriptInclude("W_Wldw_Select", "/Xt_Popwin/W_Wldw_Select.win.js"); this.RegisterClientScriptInclude("W_Wldw_Yh_Select", "/Xt_Popwin/W_Wldw_Yh_Select.win.js"); this.RegisterClientScriptInclude("W_Wldw_Zfdx_Select", "/Xt_Popwin/W_Wldw_Zfdx_Select.win.js"); this.RegisterClientScriptInclude("W_Hddz_Qsd_Select", "/Xt_Popwin/W_Hddz_Qsd_Select.win.js"); //注册相关的js文件 //注册需要使用的弹出窗口的事件处理程序的JS文件 this.RegisterClientScriptInclude("W_Index", "W_Index.win.js"); AjaxPro.Utility.RegisterTypeForAjax(typeof(PubMethod)); }
public override void OnLoad() { base.OnLoad(); //系统模块编码 ReportService report = (ReportService)dw_jzxxx.Services.Add(ServiceName.Report); report.RequestorDrawTitle = false; //DataWindowChild dwc = dw_master.GetChild("mdg"); //dwc.SetTransaction(this.AdoTransaction); //dwc.Retrieve("%"); //DataWindowChild dwc_xx = dw_jzxxx.GetChild("xx"); //dwc_xx.SetTransaction(this.AdoTransaction); //dwc_xx.Retrieve("%"); //DataWindowChild dwc_xl = dw_jzxxx.GetChild("xl"); //dwc_xl.SetTransaction(this.AdoTransaction); //dwc_xl.Retrieve("%"); //DataWindowChild dwc_clfs = dw_jzxxx.GetChild("clfs"); //dwc_clfs.SetTransaction(this.AdoTransaction); //dwc_clfs.Retrieve("%"); DataWindowChild hgdc = dw_master.GetChild("hgdc"); hgdc.SetTransaction(this.AdoTransaction); hgdc.Retrieve(""); DataWindowChild hgcp = dw_master.GetChild("hgcp"); hgcp.SetTransaction(this.AdoTransaction); hgcp.Retrieve(""); var operation = this.Request["operation"].ToString(); this.SetParm("operation", operation); var userid = AppService.GetUserID(); var username = AppService.GetUserName(); var ShareMode = AppService.GetShareMode(); var Dlwtf = AppService.GetDlwtf(); var userip = AppService.GetIp(); this.SetParm("userid", userid); this.SetParm("username", username); this.SetParm("ShareMode", ShareMode); this.SetParm("Dlwtf", Dlwtf); this.SetParm("userip", userip); if (this.Request["ywbh"] != null) { var ywbh = this.Request["ywbh"].ToString(); this.SetParm("ywbh", ywbh); dw_master.Retrieve(ywbh); dw_jzxxx.Retrieve(ywbh); dw_spxx.Retrieve(ywbh); this.dw_log.Retrieve(userid, "hgbj"); ds_jdr.Retrieve(userid); if (dw_wlgz.Retrieve(ywbh, 1) <= 0) { dw_wlgz.InsertRow(0); dw_wlgz.SetItemString(1, "ywbh", ywbh); dw_wlgz.SetItemDouble(1, "hddz_cxh", 1); dw_wlgz.SetItemString(1, "rwbh", ywbh + "11"); } if (dw_wlgz_cmd.Retrieve(ywbh, 1) <= 0) { var li_insertrow = dw_wlgz_cmd.InsertRow(0); dw_wlgz_cmd.SetItemString(li_insertrow, "ywbh", ywbh); dw_wlgz_cmd.SetItemDouble(li_insertrow, "hddz_cxh", 1); dw_wlgz_cmd.SetItemString(li_insertrow, "rwbh", ywbh + "11"); dw_wlgz_cmd.SetItemString(li_insertrow, "rwlx", "1"); dw_wlgz_cmd.SetItemDouble(li_insertrow, "rwxh", 1); dw_wlgz_cmd.SetItemString(li_insertrow, "rwmc", "港区"); var li_insertrow_shd = dw_wlgz_cmd.InsertRow(0); dw_wlgz_cmd.SetItemString(li_insertrow_shd, "ywbh", ywbh); dw_wlgz_cmd.SetItemDouble(li_insertrow_shd, "hddz_cxh", 1); dw_wlgz_cmd.SetItemString(li_insertrow_shd, "rwbh", ywbh + "11"); dw_wlgz_cmd.SetItemString(li_insertrow_shd, "rwlx", "1"); dw_wlgz_cmd.SetItemDouble(li_insertrow_shd, "rwxh", 2); dw_wlgz_cmd.SetItemString(li_insertrow_shd, "rwmc", "非市场物流地1"); var li_insertrow_dc = dw_wlgz_cmd.InsertRow(0); dw_wlgz_cmd.SetItemString(li_insertrow_dc, "ywbh", ywbh); dw_wlgz_cmd.SetItemDouble(li_insertrow_dc, "hddz_cxh", 1); dw_wlgz_cmd.SetItemString(li_insertrow_dc, "rwbh", ywbh + "11"); dw_wlgz_cmd.SetItemString(li_insertrow_dc, "rwlx", "1"); dw_wlgz_cmd.SetItemDouble(li_insertrow_dc, "rwxh", 3); dw_wlgz_cmd.SetItemString(li_insertrow_dc, "rwmc", "堆场"); } } //注册相关的js文件 this.RegisterClientScriptInclude("W_Commodity_Select", "/Commodity/W_Commodity_Select.win.js"); this.RegisterClientScriptInclude("W_Eport_Select", "/Xt_Popwin/W_Eport_Select.win.js"); this.RegisterClientScriptInclude("W_Country_Select", "/Xt_Popwin/W_Country_Select.win.js"); this.RegisterClientScriptInclude("W_Wldw_Select", "/Xt_Popwin/W_Wldw_Select.win.js"); this.RegisterClientScriptInclude("W_CommodityAdd", "/Commodity/W_CommodityAdd.win.js"); //注册相关的js文件 this.RegisterClientScriptInclude("W_WldwAdd_New", "/Xt_Popwin/W_WldwAdd_New.win.js"); //注册需要使用的弹出窗口的事件处理程序的JS文件 this.RegisterClientScriptInclude("W_Index", "W_Index.win.js"); AjaxPro.Utility.RegisterTypeForAjax(typeof(PubMethod)); }
public override void OnLoad() { base.OnLoad(); //系统模块编码 ReportService report = (ReportService)dw_jzxxx.Services.Add(ServiceName.Report); report.RequestorDrawTitle = false; //DataWindowChild dwc = dw_master.GetChild("mdg"); //dwc.SetTransaction(this.AdoTransaction); //dwc.Retrieve("%"); //DataWindowChild dwc_master_clfs = dw_master.GetChild("clfs"); //dwc_master_clfs.SetTransaction(this.AdoTransaction); //dwc_master_clfs.Retrieve("%"); //DataWindowChild dwc_jgfs = dw_master.GetChild("jgfs"); //dwc_jgfs.SetTransaction(this.AdoTransaction); //dwc_jgfs.Retrieve("%"); DataWindowChild dwc_xx = dw_jzxxx.GetChild("xx"); dwc_xx.SetTransaction(this.AdoTransaction); dwc_xx.Retrieve("%"); DataWindowChild dwc_xl = dw_jzxxx.GetChild("xl"); dwc_xl.SetTransaction(this.AdoTransaction); dwc_xl.Retrieve("%"); //DataWindowChild dwc_clfs = dw_jzxxx.GetChild("clfs"); //dwc_clfs.SetTransaction(this.AdoTransaction); //dwc_clfs.Retrieve("%"); //DataWindowChild dwc_zjmsfs = dw_spdhsr.GetChild("zjmsfs"); //dwc_zjmsfs.SetTransaction(this.AdoTransaction); //dwc_zjmsfs.Retrieve("%"); DataWindowChild dwc_sjyt = dw_spdhsr.GetChild("sjyt"); dwc_sjyt.SetTransaction(this.AdoTransaction); dwc_sjyt.Retrieve("%"); DataWindowChild dwc_hgjldw = dw_spdhsr.GetChild("hgjldw"); dwc_hgjldw.SetTransaction(this.AdoTransaction); dwc_hgjldw.Retrieve("%"); DataWindowChild dwc_fdjldw = dw_spdhsr.GetChild("fdjldw"); dwc_fdjldw.SetTransaction(this.AdoTransaction); dwc_fdjldw.Retrieve("%"); var operation = this.Request["operation"].ToString(); this.SetParm("operation", operation); if (this.Request["ywbh"] != null) { var ywbh = this.Request["ywbh"].ToString(); this.SetParm("ywbh", ywbh); if (dw_dzxx.Retrieve(ywbh) > 0) { var jyjysljg = dw_dzxx.GetItemString(1, "jyjysljg"); var jyjysljg_jsl = dw_dzxx.GetItemString(1, "jyjysljg_jsl"); if (jyjysljg == null || jyjysljg == "") { dw_dzxx.SetItemString(1, "jyjysljg", jyjysljg_jsl); } var kajyjyjg = dw_dzxx.GetItemString(1, "kajyjyjg"); var kajyjyjg_jsl = dw_dzxx.GetItemString(1, "kajyjyjg_jsl"); if (kajyjyjg == null || kajyjyjg == "") { dw_dzxx.SetItemString(1, "kajyjyjg", kajyjyjg_jsl); } var mddjyjyjg = dw_dzxx.GetItemString(1, "mddjyjyjg"); var mddjyjyjg_jsl = dw_dzxx.GetItemString(1, "mddjyjyjg_jsl"); if (mddjyjyjg == null || mddjyjyjg == "") { dw_dzxx.SetItemString(1, "mddjyjyjg", mddjyjyjg_jsl); } var lzjg = dw_dzxx.GetItemString(1, "lzjg"); var lzjg_jsl = dw_dzxx.GetItemString(1, "lzjg_jsl"); if (lzjg == null || lzjg == "") { dw_dzxx.SetItemString(1, "lzjg", lzjg_jsl); } var yjzxbs = dw_dzxx.GetItemString(1, "yjzxbs"); if (yjzxbs == null || yjzxbs == "") { dw_dzxx.SetItemString(1, "yjzxbs", "1"); } } ; if (dw_hwxx.Retrieve(ywbh) > 0) { var i = 1; for (i = 1; i <= dw_hwxx.RowCount; i++) { var jnmdd = dw_hwxx.GetItemString(i, "jnmdd"); if (jnmdd == null || jnmdd == "") { dw_hwxx.SetItemString(i, "jnmdd", "31222"); } var mdddm = dw_hwxx.GetItemString(i, "mdddm"); if (mdddm == null || mdddm == "") { var mdddm_jsl = dw_dzxx.GetItemString(1, "mdddm"); dw_hwxx.SetItemString(i, "mdddm", mdddm_jsl); } } } ; dw_jzxxx.Retrieve(ywbh); if (dw_hgfsdz.Retrieve(ywbh) <= 0) { var li_insert = dw_hgfsdz.InsertRow(0); dw_hgfsdz.SetItemString(li_insert, "dzdm", "Y"); } dw_jyjyxydz.Retrieve(ywbh); dw_qyzz.Retrieve(ywbh); dw_syrxx.Retrieve(ywbh); dw_sjzs.Retrieve(ywbh); dw_sjbzcl.Retrieve(ywbh); if (dw_jyjyxydz.Retrieve(ywbh) <= 0) { var sjzsbh_row = ds_sjzsbh.Retrieve("%"); int i = 1; for (i = 1; i <= sjzsbh_row; i++) { var insert_row = dw_jyjyxydz.InsertRow(0); var zsbh = ds_sjzsbh.GetItemString(i, "zsbh"); dw_jyjyxydz.SetItemString(insert_row, "zsbh", zsbh); dw_jyjyxydz.SetItemDecimal(insert_row, "zbfs", 1); dw_jyjyxydz.SetItemDecimal(insert_row, "fbfs", 1); } } ; if (dw_sjsfdj.Retrieve(ywbh) <= 0) { var sjsfdj_row = ds_sjsfdj.Retrieve("%"); int i = 1; for (i = 1; i <= sjsfdj_row; i++) { var insert_row = dw_sjsfdj.InsertRow(0); var sfdjbh = ds_sjsfdj.GetItemString(i, "sfdjbh"); dw_sjsfdj.SetItemString(insert_row, "sfdjbh", sfdjbh); var sfdjmc = ds_sjsfdj.GetItemString(i, "sfdjmc"); dw_sjsfdj.SetItemString(insert_row, "sfdjmc", sfdjmc); } } } //注册相关的js文件 this.RegisterClientScriptInclude("W_Commodity_Select", "/Commodity/W_Commodity_Select.win.js"); this.RegisterClientScriptInclude("W_Eport_Select", "/Xt_Popwin/W_Eport_Select.win.js"); this.RegisterClientScriptInclude("W_Country_Select", "/Xt_Popwin/W_Country_Select.win.js"); this.RegisterClientScriptInclude("W_Jnhyd_Select", "/Xt_Popwin/W_Jnhyd_Select.win.js"); this.RegisterClientScriptInclude("W_Hddz_Dlxy_Select", "/Xt_Popwin/W_Hddz_Dlxy_Select.win.js"); this.RegisterClientScriptInclude("W_Wldw_Select", "/Xt_Popwin/W_Wldw_Select.win.js"); this.RegisterClientScriptInclude("W_Mxd_Select", "/Xt_Popwin/W_Mxd_Select.win.js"); this.RegisterClientScriptInclude("W_CommodityAdd", "/Commodity/W_CommodityAdd.win.js"); //注册相关的js文件 this.RegisterClientScriptInclude("W_Spdl_Select", "/Xt_Popwin/W_Spdl_Select.win.js"); this.RegisterClientScriptInclude("W_Hssh_Select", "/Xt_Popwin/W_Hssh_Select.win.js"); this.RegisterClientScriptInclude("W_Jldw_Select", "/Xt_Popwin/W_Jldw_Select.win.js"); this.RegisterClientScriptInclude("W_Bzdw_Select", "/Xt_Popwin/W_Bzdw_Select.win.js"); this.RegisterClientScriptInclude("W_WldwAdd_New", "/Xt_Popwin/W_WldwAdd_New.win.js"); this.RegisterClientScriptInclude("W_Country_Select", "/Xt_Popwin/W_Country_Select.win.js"); this.RegisterClientScriptInclude("W_RqTime_Select", "/Xt_Popwin/W_RqTime_Select.win.js"); ////注册需要使用的弹出窗口的事件处理程序的JS文件 //this.RegisterClientScriptInclude("W_Index", "W_Index.win.js"); //AjaxPro.Utility.RegisterTypeForAjax(typeof(PubMethod)); }
/// <summary> /// Run the code example. /// </summary> /// <param name="user">The DFP user object running the code example.</param> public override void Run(DfpUser user) { // Get the LineItemService. LineItemService lineItemService = (LineItemService)user.GetService(DfpService.v201502.LineItemService); // Get the ReportService. ReportService reportService = (ReportService)user.GetService(DfpService.v201502.ReportService); try { // Set the ID of the order to get line items from. long orderId = long.Parse(_T("INSERT_ORDER_ID_HERE")); // Sets default for page. LineItemPage page = new LineItemPage(); // Create a statement to only select line items from a given order. StatementBuilder statementBuilder = new StatementBuilder() .Where("orderId = :orderId") .Limit(StatementBuilder.SUGGESTED_PAGE_LIMIT) .AddValue("orderId", orderId); // Collect all line item custom field IDs for an order. List <long> customFieldIds = new List <long>(); do { // Get line items by statement. page = lineItemService.getLineItemsByStatement(statementBuilder.ToStatement()); // Get custom field IDs from the line items of an order. if (page.results != null) { foreach (LineItem lineItem in page.results) { if (lineItem.customFieldValues != null) { foreach (BaseCustomFieldValue customFieldValue in lineItem.customFieldValues) { if (!customFieldIds.Contains(customFieldValue.customFieldId)) { customFieldIds.Add(customFieldValue.customFieldId); } } } } } statementBuilder.IncreaseOffsetBy(StatementBuilder.SUGGESTED_PAGE_LIMIT); } while (statementBuilder.GetOffset() < page.totalResultSetSize); // Create statement to filter for an order. statementBuilder.RemoveLimitAndOffset(); // Create report job. ReportJob reportJob = new ReportJob(); // Create report query. ReportQuery reportQuery = new ReportQuery(); reportQuery.dateRangeType = DateRangeType.LAST_MONTH; reportQuery.dimensions = new Dimension[] { Dimension.LINE_ITEM_ID, Dimension.LINE_ITEM_NAME }; reportQuery.statement = statementBuilder.ToStatement(); reportQuery.customFieldIds = customFieldIds.ToArray(); reportQuery.columns = new Column[] { Column.AD_SERVER_IMPRESSIONS }; reportJob.reportQuery = reportQuery; // Run report job. reportJob = reportService.runReportJob(reportJob); do { Console.WriteLine("Report with ID '{0}' is still running.", reportJob.id); Thread.Sleep(30000); // Get report job. reportJob = reportService.getReportJob(reportJob.id); } while (reportJob.reportJobStatus == ReportJobStatus.IN_PROGRESS); if (reportJob.reportJobStatus == ReportJobStatus.FAILED) { Console.WriteLine("Report job with ID '{0}' failed to finish successfully.", reportJob.id); } else { Console.WriteLine("Report job with ID '{0}' completed successfully.", reportJob.id); } } catch (Exception ex) { Console.WriteLine("Failed to run cusom fields report. Exception says \"{0}\"", ex.Message); } }
public override void OnLoad() { base.OnLoad(); //系统模块编码 ReportService report_fxsc = (ReportService)this.dw_fxsc.Services.Add(ServiceName.Report); report_fxsc.RequestorDrawTitle = false; ReportService report_thyc = (ReportService)this.dw_thyc.Services.Add(ServiceName.Report); report_thyc.RequestorDrawTitle = false; ReportService report_bgyc = (ReportService)this.dw_thsc.Services.Add(ServiceName.Report); report_bgyc.RequestorDrawTitle = false; ReportService report_bjyc = (ReportService)this.dw_wxqk.Services.Add(ServiceName.Report); report_bjyc.RequestorDrawTitle = false; ReportService report_tgyc = (ReportService)this.dw_tgyc.Services.Add(ServiceName.Report); report_tgyc.RequestorDrawTitle = false; ReportService report_fxyc = (ReportService)this.dw_fxyc.Services.Add(ServiceName.Report); report_fxyc.RequestorDrawTitle = false; ReportService report_bjtgyc = (ReportService)this.dw_bjtgyc.Services.Add(ServiceName.Report); report_bjtgyc.RequestorDrawTitle = false; ReportService report_gjyc = (ReportService)this.dw_gjyc.Services.Add(ServiceName.Report); report_gjyc.RequestorDrawTitle = false; ReportService report_hdyc = (ReportService)this.dw_hdyc.Services.Add(ServiceName.Report); report_hdyc.RequestorDrawTitle = false; ReportService report_bjhthcq = (ReportService)this.dw_bjhthcq.Services.Add(ServiceName.Report); report_bjhthcq.RequestorDrawTitle = false; var userid = AppService.GetUserID(); var username = AppService.GetUserName(); var ShareMode = AppService.GetShareMode(); var Dlwtf = AppService.GetDlwtf(); var Tybm = AppService.GetTybm(); var Sfqytybm = AppService.GetSfqytybm(); this.SetParm("userid", userid); this.SetParm("username", username); this.SetParm("ShareMode", ShareMode); this.SetParm("Dlwtf", Dlwtf); this.SetParm("Tybm", Tybm); this.SetParm("Sfqytybm", Sfqytybm); // 数据分页检索,必须在数据检索之前设置 //this.dw_list.PageSize = 50; //每页检索50条记录 this.ds_1.DataWindowObject = "d_sys_modules_all"; this.ds_1.Retrieve(); var node = "000158"; var li_row = this.ds_1.FindRow("id='" + node + "'", 1, this.ds_1.RowCount); DateTime date = System.DateTime.Now.AddDays(-30); this.dp_begin.Value = date; //接单人 this.ds_2.DataWindowObject = "dd_jdr_list"; this.ds_2.Retrieve(); ddlb_jdr.Items.Add("全部"); for (int row = 1; row <= this.ds_2.RowCount; row++) { var ctr_area2 = this.ds_2.GetItemString(row, "jdrjc"); ddlb_jdr.Items.Add(ctr_area2); } // 数据检索 this.dw_fxsc.Retrieve(DateTime.Parse(this.dp_begin.Value.ToString()), DateTime.Parse(this.dp_end.Value.ToString()), "全部"); this.dw_thyc.Retrieve(DateTime.Parse(this.dp_begin.Value.ToString()), DateTime.Parse(this.dp_end.Value.ToString()), "全部"); this.dw_thsc.Retrieve(DateTime.Parse(this.dp_begin.Value.ToString()), DateTime.Parse(this.dp_end.Value.ToString()), "全部"); this.dw_wxqk.Retrieve(DateTime.Parse(this.dp_begin.Value.ToString()), DateTime.Parse(this.dp_end.Value.ToString()), "全部"); this.dw_tgyc.Retrieve(DateTime.Parse(this.dp_begin.Value.ToString()), DateTime.Parse(this.dp_end.Value.ToString()), "全部"); this.dw_fxyc.Retrieve(DateTime.Parse(this.dp_begin.Value.ToString()), DateTime.Parse(this.dp_end.Value.ToString()), "全部"); this.dw_bjtgyc.Retrieve(DateTime.Parse(this.dp_begin.Value.ToString()), DateTime.Parse(this.dp_end.Value.ToString()), "全部"); this.dw_gjyc.Retrieve(DateTime.Parse(this.dp_begin.Value.ToString()), DateTime.Parse(this.dp_end.Value.ToString()), "全部"); this.dw_hdyc.Retrieve(DateTime.Parse(this.dp_begin.Value.ToString()), DateTime.Parse(this.dp_end.Value.ToString()), "全部"); this.dw_bjhthcq.Retrieve(DateTime.Parse(this.dp_begin.Value.ToString()), DateTime.Parse(this.dp_end.Value.ToString()), "全部"); this.dw_mtsjthyc.Retrieve(DateTime.Parse(this.dp_begin.Value.ToString()), DateTime.Parse(this.dp_end.Value.ToString()), "全部"); //this.dw_wdqk.Retrieve(DateTime.Parse(this.dp_begin.Value.ToString()), DateTime.Parse(this.dp_end.Value.ToString()), Dlwtf, "单证"); //this.dw_gqdjyd.Retrieve(DateTime.Parse(this.dp_begin.Value.ToString()), DateTime.Parse(this.dp_end.Value.ToString()), Dlwtf, "单证"); //注册相关的js文件 this.RegisterClientScriptInclude("ExtPB_Demo", "/Beta3/ExtPB_Demo.js"); this.RegisterClientScriptInclude("W_HddzList_Hyycgz", "/Hddz/W_HddzList_Hyycgz.win.js"); this.RegisterClientScriptInclude("W_Wldw_htjhthsj_Select", "/Xt_Popwin/W_Wldw_htjhthsj_Select.win.js"); this.RegisterClientScriptInclude("W_Hddz_Ycyy", "/Hddz/W_Hddz_Ycyy.win.js"); this.RegisterClientScriptInclude("W_Filter", "/Hddz/W_Filter.win.js"); //注册需要使用的弹出窗口的事件处理程序的JS文件 this.RegisterClientScriptInclude("W_Index", "W_Index.win.js"); AjaxPro.Utility.RegisterTypeForAjax(typeof(PubMethod)); }
public override void OnLoad() { base.OnLoad(); //系统模块编码 ReportService report = (ReportService)this.dw_list.Services.Add(ServiceName.Report); report.RequestorDrawTitle = false; var userid = AppService.GetUserID(); var username = AppService.GetUserName(); var ShareMode = AppService.GetShareMode(); var Dlwtf = AppService.GetDlwtf(); this.SetParm("userid", userid); this.SetParm("username", username); this.SetParm("ShareMode", ShareMode); this.SetParm("Dlwtf", Dlwtf); // 数据分页检索,必须在数据检索之前设置 //this.dw_list.PageSize = 50; //每页检索50条记录 //DataWindowChild dwc = dw_list.GetChild("ywy"); //dwc.SetTransaction(this.AdoTransaction); //dwc.Retrieve(""); //dwc = dw_list.GetChild("zdr"); //dwc.SetTransaction(this.AdoTransaction); //dwc.Retrieve(""); //dwc = dw_list.GetChild("dz_zdy"); //dwc.SetTransaction(this.AdoTransaction); //dwc.Retrieve(""); //dwc = dw_list.GetChild("yw_Kptzs_dzjh_zdy"); //dwc.SetTransaction(this.AdoTransaction); //dwc.Retrieve(""); this.ds_1.DataWindowObject = "d_sys_modules_all"; this.ds_1.Retrieve(); var node = "000180"; var li_row = this.ds_1.FindRow("id='" + node + "'", 1, this.ds_1.RowCount); DateTime date = System.DateTime.Now.AddDays(-180); this.dp_begin.Value = date; //var role_no = this.ds_1.GetItemString(li_row, "role_no"); //ds_role.Retrieve(userid, role_no); //if (ds_role.RowCount > 0) //{ // dw_list.Modify("DataWindow.Readonly=no"); // this.SetParm("Readonly", "no"); //} //else //{ // dw_list.Modify("DataWindow.Readonly=yes"); // this.SetParm("Readonly", "yes"); //} //if (Dlwtf.Length > 1) { // btn_dkytjk.Visible = false; //} ddlb_ccfqr.Items.Add("全部"); ddlb_ccfqr.Items.Add("未选择"); ddlb_ccfqr.Items.Add("未收取"); ddlb_ccfqr.Items.Add("已收取"); // 数据检索 this.dw_list.Retrieve(DateTime.Parse(this.dp_begin.Value.ToString()), DateTime.Parse(this.dp_end.Value.ToString()), "全部"); this.dw_log.Retrieve(userid, "kybg"); //注册相关的js文件 this.RegisterClientScriptInclude("ExtPB_Demo", "/Beta3/ExtPB_Demo.js"); this.RegisterClientScriptInclude("W_HddzYtjkEdit", "/Hddz/W_HddzYtjkEdit.win.js"); this.RegisterClientScriptInclude("W_hdfy_Ccfqr_Ky", "/Hddz/W_hdfy_Ccfqr_Ky.win.js"); this.RegisterClientScriptInclude("W_Wldw_Select", "/Xt_Popwin/W_Wldw_Select.win.js"); this.RegisterClientScriptInclude("W_Fj_Edit", "/Hddz/W_Fj_Edit.win.js"); this.RegisterClientScriptInclude("W_Filter", "/Hddz/W_Filter.win.js"); //注册需要使用的弹出窗口的事件处理程序的JS文件 this.RegisterClientScriptInclude("W_Index", "W_Index.win.js"); AjaxPro.Utility.RegisterTypeForAjax(typeof(PubMethod)); }
public override void OnLoad() { base.OnLoad(); //系统模块编码 ReportService report = (ReportService)this.dw_list.Services.Add(ServiceName.Report); report.RequestorDrawTitle = false; var userid = AppService.GetUserID(); var username = AppService.GetUserName(); var ShareMode = AppService.GetShareMode(); var Dlwtf = AppService.GetDlwtf(); this.SetParm("userid", userid); this.SetParm("username", username); this.SetParm("ShareMode", ShareMode); this.SetParm("Dlwtf", Dlwtf); // 数据分页检索,必须在数据检索之前设置 //this.dw_list.PageSize = 50; //每页检索50条记录 //DataWindowChild dwc = dw_list.GetChild("zbr"); //dwc.SetTransaction(this.AdoTransaction); //dwc.Retrieve(""); //dwc = dw_list.GetChild("zdr"); //dwc.SetTransaction(this.AdoTransaction); //dwc.Retrieve(""); //dwc = dw_list.GetChild("dz_zdy"); //dwc.SetTransaction(this.AdoTransaction); //dwc.Retrieve(""); //dwc = dw_list.GetChild("yw_Kptzs_dzjh_zdy"); //dwc.SetTransaction(this.AdoTransaction); //dwc.Retrieve(""); this.ds_1.DataWindowObject = "d_sys_modules_all"; this.ds_1.Retrieve(); var node = "000521"; var li_row = this.ds_1.FindRow("id='" + node + "'", 1, this.ds_1.RowCount); var role_no = this.ds_1.GetItemString(li_row, "role_no"); DateTime date = System.DateTime.Now.AddDays(-180); this.dp_begin.Value = date; ds_role.Retrieve(userid, role_no); if (ds_role.RowCount > 0) { btn_delete.Visible = true; this.SetParm("operation", "open"); dw_list.Modify("DataWindow.Readonly=no"); } else { btn_delete.Visible = false; this.SetParm("operation", "show"); dw_list.Modify("DataWindow.Readonly=yes"); } // 数据检索 this.dw_list.Retrieve(DateTime.Parse(this.dp_begin.Value.ToString()), DateTime.Parse(this.dp_end.Value.ToString()), "已回堆场费用未处理"); //注册相关的js文件 this.RegisterClientScriptInclude("ExtPB_Demo", "/Beta3/ExtPB_Demo.js"); this.RegisterClientScriptInclude("W_HdfyhycdfyList", "/Yw_Zjgl/W_HdfyhycdfyList.win.js"); this.RegisterClientScriptInclude("W_HdfyhycdfyEdit", "/Yw_Zjgl/W_HdfyhycdfyEdit.win.js"); this.RegisterClientScriptInclude("W_Filter", "/Hddz/W_Filter.win.js"); //注册需要使用的弹出窗口的事件处理程序的JS文件 this.RegisterClientScriptInclude("W_Index", "W_Index.win.js"); AjaxPro.Utility.RegisterTypeForAjax(typeof(PubMethod)); }
public override void OnLoad() { base.OnLoad(); //系统模块编码 ReportService report = (ReportService)dw_jzxxx.Services.Add(ServiceName.Report); report.RequestorDrawTitle = false; var operation = this.Request["operation"].ToString(); this.SetParm("operation", operation); var userid = AppService.GetUserID(); var username = AppService.GetUserName(); var ShareMode = AppService.GetShareMode(); var Dlwtf = AppService.GetDlwtf(); var userip = AppService.GetIp(); var bm = AppService.GetBm(); this.SetParm("userid", userid); this.SetParm("username", username); this.SetParm("ShareMode", ShareMode); this.SetParm("Dlwtf", Dlwtf); this.SetParm("userip", userip); this.SetParm("bm", bm); DataWindowChild gwgysjc = dw_master.GetChild("gwgysjc"); gwgysjc.SetTransaction(this.AdoTransaction); gwgysjc.Retrieve(""); DataWindowChild khjc = dw_master.GetChild("khjc"); khjc.SetTransaction(this.AdoTransaction); khjc.Retrieve(""); DataWindowChild xskhjc = dw_master.GetChild("xskhjc"); xskhjc.SetTransaction(this.AdoTransaction); xskhjc.Retrieve(""); DataWindowChild jhdd = dw_master.GetChild("jhdd"); jhdd.SetTransaction(this.AdoTransaction); jhdd.Retrieve(""); DataWindowChild hgdc = dw_master.GetChild("hgdc"); hgdc.SetTransaction(this.AdoTransaction); hgdc.Retrieve(""); DataWindowChild spmc = dw_spxx.GetChild("spmc"); spmc.SetTransaction(this.AdoTransaction); spmc.Retrieve(""); if (this.Request["ywbh"] != null) { var ywbh = this.Request["ywbh"].ToString(); this.SetParm("ywbh", ywbh); dw_master.Retrieve(ywbh); dw_jzxxx.Retrieve(ywbh); dw_spxx.Retrieve(ywbh); this.dw_log.Retrieve(userid, "ywbj"); ds_jdr.Retrieve(userid); } //注册相关的js文件 this.RegisterClientScriptInclude("W_Commodity_Select", "/Commodity/W_Commodity_Select.win.js"); this.RegisterClientScriptInclude("W_Eport_Select", "/Xt_Popwin/W_Eport_Select.win.js"); this.RegisterClientScriptInclude("W_Country_Select", "/Xt_Popwin/W_Country_Select.win.js"); this.RegisterClientScriptInclude("W_Wldw_Select_Sz", "/Xt_Popwin/W_Wldw_Select_Sz.win.js"); this.RegisterClientScriptInclude("W_WldwAdd_New", "/Xt_Popwin/W_WldwAdd_New.win.js"); this.RegisterClientScriptInclude("W_CommodityAdd", "/Commodity/W_CommodityAdd.win.js"); //注册需要使用的弹出窗口的事件处理程序的JS文件 this.RegisterClientScriptInclude("W_Index", "W_Index.win.js"); AjaxPro.Utility.RegisterTypeForAjax(typeof(PubMethod)); }
/// <remarks> /// Handles report export to .xlsx file on button click /// </remarks> /// <param name="sender"></param> /// <param name="e"></param> private void btnExport_Click(object sender, RoutedEventArgs e) { ReportService reportSrv = new ReportService(); List<ExportBO> exportReportList = new List<ExportBO>(); //converts List<BookingBO> to List <ExportBO> if (_output != null && _output.Count != 0) { foreach (BookingBO booking in _output) { ExportBO item = new ExportBO(booking); exportReportList.Add(item); } } //converts List to DataTable and adds DataTable to DataSet System.Data.DataTable dtReport = reportSrv.ToDataTable<ExportBO>(exportReportList); DataSet dsReport = new DataSet(); dsReport.Tables.Add(dtReport); //determines path for report file string reportFileName = "report.xlsx"; string currentExecutionDirPath = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location); string reportFilePath = string.Format("{0}\\{1}{2}", currentExecutionDirPath, DateTime.Now.ToString("MMMMdd_yyyy_H_mm_ss"), reportFileName); //saving report to excel reportSrv.ExportToExcel(dsReport, reportFilePath); // check if file exists and open, if exists. FileInfo fi = new FileInfo(reportFilePath); if (fi.Exists) { System.Diagnostics.Process.Start(reportFilePath); } else { //file doesn't exist } }
public ActionResult PrintOnlyQRCode(int PackingHeaderId, string ListofRollNo) { string mQry, bConStr = ""; DataTable DtTemp = new DataTable(); DataTable Dt = new DataTable(); bConStr = " AND H.PackingHeaderId In ( " + PackingHeaderId + " )"; if (ListofRollNo == null) { ListofRollNo = "''"; } { bConStr = bConStr + " AND L.BaleNo In ( " + ListofRollNo + " )"; } mQry = "SELECT B.Name AS BuyerName, P.ProductName AS CarpetSKU, SOH.DocNo AS SaleOrder , SOH.SaleOrderHeaderId, " + " ISNULL(PB.BuyerUpcCode,'') AS UpcCode, isnumeric(PB.BuyerUpcCode) AS BuyerUpcCodeNumeric, L.ProductId, L.Qty, L.PartyProductUid, " + " PU.ProductUidName, L.BaleNo, SOH.SaleToBuyerId, PB.BuyerSku " + " FROM Web.PackingHeaders H " + " LEFT JOIN Web.PackingLines L ON L.PackingHeaderId = H.PackingHeaderId " + " LEFT JOIN Web.Products P ON P.ProductId = L.ProductId " + " LEFT JOIN Web.ProductUids PU ON PU.ProductUIDId = L.ProductUidId " + " LEFT JOIN web.SaleOrderLines SOL ON SOL.SaleOrderLineId = L.SaleOrderLineId " + " LEFT JOIN Web.SaleOrderHeaders SOH ON SOH.SaleOrderHeaderId = SOL.SaleOrderHeaderId " + " LEFT JOIN Web.ProductBuyers PB ON PB.ProductId = L.ProductId AND PB.BuyerId = H.BuyerId " + " LEFT JOIN Web.People B ON B.PersonID = SOH.SaleToBuyerId " + " Where 1=1 " + bConStr + " ORDER BY H.DocDate, H.PackingHeaderId, L.PackingLineId "; SqlConnection con = new SqlConnection(connectionString); if (con.State != ConnectionState.Open) { con.Open(); } SqlDataAdapter sqlDataAapter = new SqlDataAdapter(mQry, con); dsRep.EnforceConstraints = false; sqlDataAapter.Fill(DtTemp); if (DtTemp.Rows.Count > 0) { RepName = "Packing_LabelPrint_OnlyQRCode"; Dt = FGetDataForSCILabelPrint(DtTemp, con); reportdatasource = new ReportDataSource("DsMain", Dt); //reportViewer.LocalReport.ReportPath = Request.MapPath(ConfigurationManager.AppSettings["ReportsPath"] + RepName + ".rdlc"); reportViewer.LocalReport.ReportPath = ConfigurationManager.AppSettings["PhysicalRDLCPath"] + ConfigurationManager.AppSettings["ReportsPathFromService"] + RepName + ".rdlc"; ReportService reportservice = new ReportService(); reportservice.SetReportAttibutes(reportViewer, reportdatasource, "Packing Label Print", ""); return(PrintReport(reportViewer, "PDF")); } else { return(View("Close")); } }
public void Init() { TestUtils utils = new TestUtils(); reportService = (ReportService) user.GetService(DfpService.v201511.ReportService); reportId = utils.CreateReport(user).id; }
public ActionResult PrintBarCode(int PackingHeaderId, string ListofRollNo) { string mQry, bConStr = ""; DataTable DtTemp = new DataTable(); DataTable Dt = new DataTable(); bConStr = " AND H.PackingHeaderId In ( " + PackingHeaderId + " )"; if (ListofRollNo == null) { ListofRollNo = "''"; } { bConStr = bConStr + " AND L.BaleNo In ( " + ListofRollNo + " )"; } mQry = "SELECT B.Name AS BuyerName, P.ProductName AS CarpetSKU, SOH.DocNo AS SaleOrder , SOH.SaleOrderHeaderId, " + " PB.BuyerUpcCode AS UpcCode,isnumeric(PB.BuyerUpcCode) AS BuyerUpcCodeNumeric, L.ProductId, L.Qty, L.PartyProductUid, isnull(PG.ProductTypeId,0) AS ProductTypeId, " + " PU.ProductUidName, L.BaleNo, SOH.SaleToBuyerId, PB.BuyerSku " + " FROM Web.PackingHeaders H " + " LEFT JOIN Web.PackingLines L ON L.PackingHeaderId = H.PackingHeaderId " + " LEFT JOIN Web.Products P ON P.ProductId = L.ProductId " + " LEFT JOIN Web.ProductUids PU ON PU.ProductUIDId = L.ProductUidId " + " LEFT JOIN web.SaleOrderLines SOL ON SOL.SaleOrderLineId = L.SaleOrderLineId " + " LEFT JOIN Web.SaleOrderHeaders SOH ON SOH.SaleOrderHeaderId = SOL.SaleOrderHeaderId " + " LEFT JOIN Web.ProductBuyers PB ON PB.ProductId = L.ProductId AND PB.BuyerId = H.BuyerId " + " LEFT JOIN Web.People B ON B.PersonID = SOH.SaleToBuyerId " + " LEFT JOIN WEb.ProductGroups PG ON PG.ProductGroupId = P.ProductGroupId " + " Where 1=1 " + bConStr + " ORDER BY H.DocDate, H.PackingHeaderId, L.PackingLineId "; SqlConnection con = new SqlConnection(connectionString); if (con.State != ConnectionState.Open) { con.Open(); } SqlDataAdapter sqlDataAapter = new SqlDataAdapter(mQry, con); dsRep.EnforceConstraints = false; sqlDataAapter.Fill(DtTemp); if (DtTemp.Rows.Count > 0) { if (DtTemp.Rows[0]["BuyerName"].ToString() == "Home Decorators Collection") { RepName = "Packing_HDCLabelPrint"; Dt = FGetDataForHDCLabelPrint(DtTemp, con); } else if (DtTemp.Rows[0]["BuyerName"].ToString() == "Artistic Weavers") { //RepName = "Packing_AWLabelPrint"; //RepName = "Packing_AWLabelPrintNew"; RepName = "Packing_AWLabelPrintNew11317"; Dt = FGetDataForSCILabelPrint(DtTemp, con); } else { //RepName = "Packing_LabelPrint"; if (DtTemp.Rows[0]["ProductTypeId"].ToString() != "1") { RepName = "Packing_LabelPrint_ForPouf"; Dt = FGetDataForSCILabelPrint(DtTemp, con); } else { //RepName = "Packing_LabelPrintNew"; //RepName = "Packing_LabelPrintNew_1422017"; RepName = ReportName(DtTemp); Dt = FGetDataForSCILabelPrint(DtTemp, con); } } reportdatasource = new ReportDataSource("DsMain", Dt); reportViewer.LocalReport.ReportPath = Request.MapPath(ConfigurationManager.AppSettings["ReportsPath"] + RepName + ".rdlc"); ReportService reportservice = new ReportService(); reportservice.SetReportAttibutes(reportViewer, reportdatasource, "Packing Label Print", ""); return(PrintReport(reportViewer, "PDF")); } else { return(View("Close")); } }
/// <summary> /// Initializes a new instance of the <see cref="ReportController" /> class. /// </summary> /// <param name="projectHourReportService">The project hour report service.</param> /// <param name="lookupService">The lookup service.</param> /// <param name="timesheetReportService">The timesheet report service.</param> /// <param name="timesheetService">The timesheet service.</param> /// <param name="teamEngagementReportService">The team engagement report service.</param> /// <param name="teamEngagementService">The team engagement service.</param> /// <param name="projectService">The project service.</param> /// <param name="projectComplianceReportService">The project compliance report service.</param> /// <param name="developerService">The developer service.</param> /// <param name="reportService">The report service.</param> /// <param name="releaseService">The release service.</param> /// <param name="feedbackService">The feedback service.</param> public ReportController(ProjectHourReportService projectHourReportService, LookupService lookupService, TimesheetReportService timesheetReportService, TimesheetService timesheetService, TeamEngagementReportService teamEngagementReportService, TeamEngagementService teamEngagementService, ProjectService projectService, ProjectComplianceReportService projectComplianceReportService, DeveloperService developerService, ReportService reportService, ReleaseService releaseService, FeedbackService feedbackService) { this.projectHourReportService = projectHourReportService; this.lookupService = lookupService; this.timesheetReportService = timesheetReportService; this.timesheetService = timesheetService; this.teamEngagementReportService = teamEngagementReportService; this.projectService = projectService; this.projectComplianceReportService = projectComplianceReportService; this.developerService = developerService; this.releaseService = releaseService; this.reportService = reportService; this.feedbackService = feedbackService; this.teamEngagementService = teamEngagementService; }