private void btnPrint_Click(object sender, EventArgs e) { try { var lista = EmpresaRepository.GetAll(); if (lista == null || lista.Count == 0) { throw new ErrorMessageException("É necessário realizar o cadastro da Empresa em COnfigurações"); } _empresa = lista[0]; string path = @"Projeto_Pedido.Reports.ImpressaoPedido.rdlc"; if (this.reportViewer == null) { this.reportViewer = new ReportViewer(); } var listItens = _pedido.ItensPedido; this.reportViewer.LocalReport.DataSources.Add(new ReportDataSource("DataSet2", listItens)); FormReport frmReport = new FormReport(this.reportViewer, path, GetParametersToPrint()); frmReport.ShowDialog(); } catch (ErrorMessageException eme) { MessageBox.Show(eme.Message, "Aviso", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ex) { } }
private void btnPrint_Click(object sender, EventArgs e) { var lista = EmpresaRepository.GetAll(); if (lista == null || lista.Count == 0) { throw new ErrorMessageException("É necessário realizar o cadastro da Empresa em COnfigurações"); } _empresa = lista[0]; //imgLoop.Visible = true; this.Enabled = false; //string path = @"Projeto_Pedido.Reports.ReportPedido.rdlc"; if (this.reportViewer == null) { this.reportViewer = new ReportViewer(); } this.reportViewer.LocalReport.DataSources.Add(new ReportDataSource("DataSet2", listagemImpressao)); string path = @"Projeto_Pedido.Reports.ReportPedido.rdlc"; frmReport = new FormReport(this.reportViewer, path, GetParametersToPrint()); this.Enabled = true; frmReport.ShowDialog(); }
private void ShowReport(object obj) { Debug.WriteLine(" ShowReport(object obj)"); var m = obj as ModuleBox; var arr = _mBox.ApplicationOptions.FilePatterns; var arrIndx = new int[arr.Count]; foreach (var au in m.ListReportAudit) { foreach (var fw in au.FindWords) { arrIndx[fw.WordIndexArr] += fw.CountInFile; } } m.ListReportAudit.Clear(); List <string> report = new List <string>(); string str = "\n\rЗнайдені слова:"; for (int i = 0; i < arrIndx.Length; i++) { str += $"\n\r{_mBox.ApplicationOptions.FilePatterns[i]} - {arrIndx[i]} раз."; } for (int i = 0; i < lbx_AuditMonitor.Items.Count; i++) { str += "\r\n" + lbx_AuditMonitor.Items[i].ToString(); } str += $"\r\n Пушук збережено у файлі: {_mBox.ApplicationOptions.PathToCopyFile + @"\Report.txt"}"; lbx_AuditMonitor.Items.Clear(); FormReport fr = new FormReport(str); fr.ShowDialog(); }
private void reportToolStripMenuItem_Click(object sender, EventArgs e) { var reportForm = new FormReport(); reportForm.MdiParent = this; reportForm.Show(); }
private void reportToolStripMenuItem1_Click(object sender, EventArgs e) { FormReport FB = new FormReport(temp_user_id); FB.MdiParent = this; FB.Show(); }
private void btnShow_Click(object sender, EventArgs e) { ReportDocument reportDocument = new ReportDocument(); string filePath = String.Format("{0}\\ItemWiseSales.rpt", System.Configuration.ConfigurationManager.AppSettings["ReportFolderPath"]); reportDocument.Load(filePath); reportDocument.Refresh(); reportDocument.SetParameterValue("@StartDate", dtpStartDate.Value.Date); reportDocument.SetParameterValue("@EndDate", dtpEndDate.Value.Date); reportDocument.SetParameterValue("@paymenttype", cmbPaymentType.Text); reportDocument.SetParameterValue("@StartDate", dtpStartDate.Value.Date, reportDocument.Subreports[0].Name.ToString()); reportDocument.SetParameterValue("@EndDate", dtpEndDate.Value.Date, reportDocument.Subreports[0].Name.ToString()); reportDocument.SetParameterValue("@paymenttype", cmbPaymentType.Text, reportDocument.Subreports[0].Name.ToString()); FormReport frm = new FormReport(); frm.Text = "Item Wise Sales Report"; frm.crystalReportViewer1.ReportSource = reportDocument; frm.Visible = true; }
public void RemoveFormReport(FormReport formReport) { var formReportRepository = RepositoryFactory.GetFormReportRepository(); try { formReportRepository.Remove(formReport); } catch (RepositoryException ex) { throw new FormReportServiceException(ex); } }
private void btnPrintInvoice_Click(object sender, EventArgs e) { if (_billId > 0) { BillInfo _billInfo = createBillInfoObject(); _billInfo.BillId = _billId; _billInfo.BillNo = "B" + _billId; new BllBillInfo().InsertOrUpdate(_billInfo); } /*ReportInvoice rpt = new ReportInvoice(); * * foreach (CrystalDecisions.CrystalReports.Engine.Table tbCurrent in rpt.Database.Tables) * { * SetTableLogin(tbCurrent); * } * * rpt.SetParameterValue("@billid", _billId); * * FormReport frm = new FormReport(); * frm.Text = "Invoice"; * frm.crystalReportViewer1.ReportSource = rpt; * frm.Visible = true;*/ ReportDocument reportDocument = new ReportDocument(); string filePath = String.Format("{0}\\Invoice.rpt", System.Configuration.ConfigurationManager.AppSettings["ReportFolderPath"]); reportDocument.Load(filePath); reportDocument.Refresh(); reportDocument.SetParameterValue("@billid", _billId); reportDocument.SetParameterValue("@billid", _billId, reportDocument.Subreports[0].Name.ToString()); FormReport frm = new FormReport(); frm.Text = "Invoice"; frm.crystalReportViewer1.ReportSource = reportDocument; frm.Visible = true; btnSave.Enabled = true; }
internal static void Click(DTE dte) { try { dte.StatusBar.Animate(true, vsStatusAnimation.vsStatusAnimationDeploy); if (UtilityPackage.GetCrmServiceClient(dte)) { var crmServiceClient = (CrmServiceClient)UtilityPackage.GetGlobal("CrmServiceClient", dte); var crmUrl = (string)UtilityPackage.GetGlobal("CrmUrl", dte); UtilityPackage.SetDTEStatusBar(dte, $"[{crmUrl}] Connected"); var fullFileName = dte.SelectedItems.Item(1).ProjectItem.FileNames[0]; var cacheReportFromVS = GetCacheReportFromVS(dte, fullFileName); if (cacheReportFromVS == null) { var cacheReportFromFile = GetCacheReportFromFile(fullFileName); var formReport = new FormReport(crmServiceClient, cacheReportFromFile); if (formReport.ShowDialog() == DialogResult.OK) { var language = formReport.Language; var solution = formReport.Solution; var reportName = formReport.ReportName; var reportId = formReport.ReportId; DoDeployReport(dte, crmServiceClient, reportId, fullFileName); AddToCache(dte, language, solution, reportName, reportId, fullFileName); } } else { DoDeployReport(dte, crmServiceClient, cacheReportFromVS.Value, fullFileName); } } dte.StatusBar.Animate(false, vsStatusAnimation.vsStatusAnimationDeploy); } catch { UtilityPackage.SetDTEStatusBarAndStopAnimate(dte, "Deploy WebResource failed"); } }
public FormReport CreateFormReport(string name) { var formReportRepository = RepositoryFactory.GetFormReportRepository(); var formReport = new FormReport { Name = name }; formReportRepository.Create(formReport); try { UnitOfWork.PreSave(); } catch (RepositoryException ex) { throw new FormReportServiceException(ex); } return(formReport); }
static void Main() { //Application.ThreadException += new ThreadExceptionEventHandler(Application_ThreadException); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new FormLogin()); // Test //Bill newBill = Bill.GetBill(10000017); //Patient patient = Patient.GetPatient(10000000); //Application.Run(new FormBillDetail("edit", newBill)); FormReport test = new FormReport(); test.ReportType = "REVENUEBYDAY"; test.ObjectID = 10000001; test.DATEFROM = new DateTime(2012, 5, 30); test.DATETO = new DateTime(2012, 6, 4); //Application.Run(test); //Application.Run(new Form2()); }
private void relatórioToolStripMenuItem_Click(object sender, EventArgs e) { FormReport formReport = new FormReport(); formReport.ShowDialog(); }
public void SetFormReportOfJournalCurriculum(FormReport formReport, JournalCurriculum journalCurriculum) { journalCurriculum.FormReport = formReport; }
public JournalCurriculum CreateJournalCurriculum(int time, Discipline discipline, FormReport formReport, Curriculum curriculum) { var journalCurriculumRepository = RepositoryFactory.GetJournalCurriculumRepository(); var journalCurriculum = new JournalCurriculum { Time = time }; journalCurriculum.Curriculum = curriculum; journalCurriculum.CurriculumId = curriculum.Id; this.SetDisciplineOfJournalCurriculum(discipline, journalCurriculum); this.SetFormReportOfJournalCurriculum(formReport, journalCurriculum); journalCurriculumRepository.Create(journalCurriculum); try { UnitOfWork.PreSave(); } catch (RepositoryException ex) { throw new JournalCurriculumServiceException(ex); } return(journalCurriculum); }
/// <summary> /// Shows the form for reporting a problem with TAMS4 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void reportProblemsToolStripMenuItem_Click(object sender, EventArgs e) { FormReport report = new FormReport(); report.Show(this); }
public ReportPresenter(FormReport view, Repository repository) { Repository = repository; View = view; }