Beispiel #1
0
        /// <summary>
        /// Design
        /// </summary>
        internal void Design()
        {
            EntityEmrPrintTemplate rptVo = Viewer.txtTemplateCode.Tag as EntityEmrPrintTemplate;

            if (rptVo == null)
            {
                DialogBox.Msg("请保存打印模板。");
                return;
            }
            if (Viewer.ValueChanged)
            {
                if (this.Save(false) == false)
                {
                    return;
                }
            }
            rptVo.dataSource = GetDataSource();
            using (frmReportDesigner frm = new frmReportDesigner(rptVo))
            {
                frm.ShowDialog();
                if (frm.IsSave)
                {
                    int index = (Viewer.tvTemplate.DataSource as List <EntityEmrPrintTemplate>).FindIndex(t => t.templateId == rptVo.templateId);
                    (Viewer.tvTemplate.DataSource as List <EntityEmrPrintTemplate>)[index] = rptVo;
                    LoadTemplate(rptVo);
                }
            }
        }
Beispiel #2
0
 /// <summary>
 /// SetUI
 /// </summary>
 /// <param name="child"></param>
 public override void SetUI(frmBase child)
 {
     base.SetUI(child);
     Viewer = (frmReportDesigner)child;
 }