/// <summary> /// 构造函数... /// 外部不能直接实例。 /// </summary> protected PrintContextMenu(MB.WinPrintReport.IFace.IReportData reportDataHelper) { _MenuItems = new Dictionary <System.Windows.Forms.MenuItem, MB.WinPrintReport.Model.PrintTempleteContentInfo>(); _ReportDataHelper = reportDataHelper; _ReportTemplete = new ReportTemplete(_ReportDataHelper); createMenuItem(reportDataHelper); }
/// <summary> /// 报表模板设计。 /// </summary> /// <param name="reportDataHelper"></param> /// <param name="moduleID"></param> /// <param name="templeteID"></param> public FrmEditPrintTemplete(MB.WinPrintReport.IFace.IReportData reportDataHelper, System.Guid templeteID) { InitializeComponent(); _ModuleID = reportDataHelper.ModuleID; _ReportDataHelper = reportDataHelper; _ReportTempleteHelper = new ReportTemplete(reportDataHelper); _PrintTemplete = reportDataHelper.GetPrintTemplete(templeteID); if (_PrintTemplete == null) { _PrintTemplete = createNewPrintTemplete(); _PrintTemplete.GID = templeteID; _PrintTemplete.DataSource = (reportDataHelper.DataSource as DataSet).Tables[0].TableName; } _BindingSource = new MB.WinBase.Binding.BindingSourceEx(); _BindingSource.DataSource = _PrintTemplete; }