锐腾搅拌上料功能
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

84 lines
1.8 KiB

5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Text;
  7. using System.Windows.Forms;
  8. using DevExpress.XtraEditors;
  9. using System.Data.SqlClient;
  10. using ICSSoft.Frame.APP;
  11. using System.Configuration;
  12. using ICSSoft.Frame.APP.Helper;
  13. using ICSSoft.Frame.APP.Model;
  14. using DevExpress.XtraGrid.Columns;
  15. using System.Linq;
  16. using FastReport;
  17. using FastReport.Data;
  18. using FastReport.Design;
  19. namespace ICSSoft.Frame.APP
  20. {
  21. public partial class FormPreview : DevExpress.XtraEditors.XtraForm
  22. {
  23. /// <summary>
  24. /// 打印模型
  25. /// </summary>
  26. private List<PrintModel> model { get; set; }
  27. public FormPreview()
  28. {
  29. InitializeComponent();
  30. }
  31. public FormPreview(List<PrintModel> model)
  32. {
  33. InitializeComponent();
  34. this.model = model;
  35. }
  36. private void FormPreview_Load(object sender, EventArgs e)
  37. {
  38. Report report = new Report();
  39. report.RegisterData(model, "DataSource");
  40. report.Load(AppDomain.CurrentDomain.BaseDirectory + "FastReport\\barcodeNew.frx");
  41. report.Prepare();
  42. report.Preview = previewControl1;
  43. report.ShowPrepared();
  44. }
  45. private void btnCancle_Click(object sender, EventArgs e)
  46. {
  47. this.DialogResult = DialogResult.Cancel;
  48. this.Close();
  49. }
  50. private void btnClose_Click(object sender, EventArgs e)
  51. {
  52. this.DialogResult = DialogResult.Cancel;
  53. this.Close();
  54. }
  55. private void previewControl1_Load(object sender, EventArgs e)
  56. {
  57. }
  58. private void previewControl1_Load_1(object sender, EventArgs e)
  59. {
  60. }
  61. }
  62. }