/// <summary> /// 批量删除数据 /// </summary> private void OnDelete() { string itemsAppend = hV.Value.Trim(); if (string.IsNullOrEmpty(itemsAppend)) { MessageBox.Messager(this.Page, this.Page.Controls[0], MessageContent.Submit_InvalidRow, "错误提醒", "error"); return; } ReportContent bll = new ReportContent(); string[] itemsAppendArr = itemsAppend.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); List <object> list = itemsAppendArr.ToList <object>(); if (bll.DeleteBatch(list)) { MessageBox.MessagerShow(this.Page, this.Page.Controls[0], MessageContent.Submit_Success); Bind(); } else { MessageBox.Messager(this.Page, this.Page.Controls[0], MessageContent.Submit_Error, "系统提示"); } }
/// <summary> /// Get content of Report /// </summary> /// <returns></returns> public static string GetContent() { // Get final content string output = Environment.NewLine + Environment.NewLine + "PROCESS REPORT: " + ErrorCount.ToString() + " ERRORS OCCURRED" + Environment.NewLine + "--------------" + Environment.NewLine + Environment.NewLine; if (ReportContent.Replace(" ", "") != "") { output += ReportContent; } else { output += "NO ERRORS."; } // Reset Report Service ReportContent = ""; ErrorStack.Clear(); ErrorCount = 0; // Return final content return(output); }
private void RptViewerOnReportRefresh(object sender, CancelEventArgs e) { if (RefreshDataSourceCallback == null) { throw new InvalidOperationException("Unable to locate the method that updates this report's data source.\n" + "Use RefreshDataSourceCallback to point to your refresh data source method." ); } ReportContent.UpdateDataSource(RefreshDataSourceCallback()); }
public LastPrintVM(IReportsBussinessLogic reportsBussinessLogic, ICacheBusinessLogic cacheBusinessLogic ) { _reportsBussinessLogic = reportsBussinessLogic; _cacheBusinessLogic = cacheBusinessLogic; PrintReportCommand = new RelayCommand(async() => { await PerformPrint(ReportContent.Split('\n')?.ToList()); }); }
private void Bind() { //查询条件 GetSearchItem(); int totalCount = 0; ReportContent bll = new ReportContent(); rpData.DataSource = bll.GetList(pageIndex, pageSize, out totalCount, sqlWhere, parms == null ? null : parms.ToArray()); rpData.DataBind(); hTotal.Value = totalCount.ToString(); }
private void InitializeCommands() { SearchBySaleNumberCommand = new RelayCommand <object>(SearchBySaleNumber); PrintReportCommand = new RelayCommand(async() => { await PerformPrint(ReportContent.Split('\n').ToList()); }); TenderDetailsCommand = new RelayCommand(async() => { await PerformPrint(_localListOfReports); }); }
/// <summary> /// Validates this Other Test Result /// </summary> /// <param name="path">The path to this object as a string</param> /// <param name="messages">the validation messages to date, these may be added to within this method</param> public void Validate(string path, List <ValidationMessage> messages) { var vb = new ValidationBuilder(path, messages); vb.ArgumentRequiredCheck("ReportName", ReportName); vb.ArgumentRequiredCheck("ReportContent", ReportContent); if (ReportContent != null) { ReportContent.Validate(path + ".ReportContent", messages); } }
public Boolean addRow(string content, string content_en, int logicid) { try { ICustomsCMS server = XmlRpcInstance.getInstance(); ReportContent reportContent = new ReportContent(); reportContent.content = content; reportContent.logicid = logicid; reportContent.content_en = content_en; reportContent.operatePeople = SystemManageService.currentUser.UserName; DBRPCResponse dBRPCResponse = server.addReportContent(reportContent); return(true); } catch (Exception ex) { throw new Exception("错误:" + ex.Message); } }
internal static void PrintWithFormActionTwoSource(string title, ReportDataSource dataHeader, ReportDataSource items, string layout, ReportParameter[] parameters) { var content = new ReportContent(dataHeader, items, layout, parameters); var dlg = new Window { Content = content, AllowsTransparency = false, Title = "", ResizeMode = System.Windows.ResizeMode.CanResizeWithGrip, WindowState = WindowState.Maximized, }; content.WindowClose = dlg.Close; var vm = new BaseNotify(); vm.MyTitle = title; dlg.DataContext = vm; dlg.ShowDialog(); }
internal static void PrintPreviewWithFormAction(string title, ReportDataSource source, string layout, ReportParameter[] parameters) { //TrireksaApp.Reports.Layouts.Nota.rdlc" var content = new ReportContent(source, layout, parameters); var dlg = new Window { AllowsTransparency = false, Content = content, Title = "", ResizeMode = System.Windows.ResizeMode.CanResizeWithGrip, WindowState = WindowState.Maximized, }; content.WindowClose = dlg.Close; var vm = new BaseNotify(); vm.MyTitle = title; dlg.DataContext = vm; dlg.ShowDialog(); }
public void SetReportContent(ReportContent content) { Content = content; textBox1.Text = Content.Title; }
public ReportSetupForm() { InitializeComponent(); Content = new ReportContent(); }