private void linkLabel3_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            ReportConfiguration ReportConfigurationGrade3 = new Campus.Report.ReportConfiguration("ibshGradeYearReport.GradeYearReportCard.SY" + _SchoolYear + ".G" + 3);

            #region 第一次列印時複製前學期的樣板
            if (ReportConfigurationGrade3.Template == null)
            {
                int prevSy = _SchoolYear - 1;

                ReportConfiguration prevConfigurationGrade = new Campus.Report.ReportConfiguration("ibshGradeYearReport.GradeYearReportCard.SY" + prevSy + ".G" + 3);
                if (prevConfigurationGrade.Template != null)
                {
                    ReportConfigurationGrade3.Template = prevConfigurationGrade.Template;
                }
            }
            #endregion

            Campus.Report.TemplateSettingForm TemplateForm;

            TemplateForm = new Campus.Report.TemplateSettingForm(ReportConfigurationGrade3.Template == null ? new ReportTemplate(Properties.Resources.Doc1, TemplateType.Word) : ReportConfigurationGrade3.Template, new ReportTemplate(Properties.Resources.Doc1, TemplateType.Word));
            //預設名稱
            TemplateForm.DefaultFileName = "StudentReportCardTemplateForGrade3";
            if (TemplateForm.ShowDialog() == DialogResult.OK)
            {
                ReportConfigurationGrade3.Template = TemplateForm.Template;
                ReportConfigurationGrade3.Save();
            }
        }
Esempio n. 2
0
        private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            string value = (string)comboBoxEx1.SelectedItem;

            if (value == "新增")
            {
                return;
            }
            //畫面內容(範本內容,預設樣式
            Campus.Report.TemplateSettingForm TemplateForm;
            if (custConfigs[current].Template == null)
            {
                custConfigs[current].Template = new Campus.Report.ReportTemplate(Properties.Resources.證明書範本, Campus.Report.TemplateType.Word);
            }
            Campus.Report.ReportTemplate defaultDoc;
            switch (value)
            {
            case "畢業證書_普通高中":
                defaultDoc = new Campus.Report.ReportTemplate(Properties.Resources.畢業證書_普通高中, Campus.Report.TemplateType.Word);
                break;

            case "畢業證書_高職":
                defaultDoc = new Campus.Report.ReportTemplate(Properties.Resources.畢業證書_高職, Campus.Report.TemplateType.Word);
                break;

            case "補發證明書_普通高中":
                defaultDoc = new Campus.Report.ReportTemplate(Properties.Resources.補發證明書_普通高中, Campus.Report.TemplateType.Word);
                break;

            case "補發證明書_高職":
                defaultDoc = new Campus.Report.ReportTemplate(Properties.Resources.補發證明書_高職, Campus.Report.TemplateType.Word);
                break;

            default:
                defaultDoc = new Campus.Report.ReportTemplate(Properties.Resources.證明書範本, Campus.Report.TemplateType.Word);
                break;
            }
            TemplateForm = new Campus.Report.TemplateSettingForm(custConfigs[current].Template, defaultDoc);
            //預設名稱
            TemplateForm.DefaultFileName = current + "樣板";
            if (TemplateForm.ShowDialog() == DialogResult.OK)
            {
                custConfigs[current].Template = TemplateForm.Template;
                custConfigs[current].Save();
            }
        }
        private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            ReportConfiguration ReportConfigurationGrade1 = new Campus.Report.ReportConfiguration("ibshGradeYearReport.GradeYearReportCard.SY" + _SchoolYear + "S" + _Semester + ".G" + 5);

            #region 第一次列印時複製前學期的樣板
            if (ReportConfigurationGrade1.Template == null)
            {
                int prevSy, prevSm;
                if (_Semester == 2)
                {
                    prevSy = _SchoolYear;
                    prevSm = 1;
                }
                else
                {
                    prevSy = _SchoolYear - 1;
                    prevSm = 2;
                }
                ReportConfiguration reportConfigurationGrade5 = new Campus.Report.ReportConfiguration("ibshGradeYearReport.GradeYearReportCard.SY" + prevSy + "S" + prevSm + ".G" + 5);
                if (reportConfigurationGrade5.Template != null)
                {
                    ReportConfigurationGrade1.Template = reportConfigurationGrade5.Template;
                }
            }
            #endregion

            Campus.Report.TemplateSettingForm TemplateForm;

            TemplateForm = new Campus.Report.TemplateSettingForm(ReportConfigurationGrade1.Template == null ? new ReportTemplate(Properties.Resources.Doc1, TemplateType.Word) : ReportConfigurationGrade1.Template, new ReportTemplate(Properties.Resources.Doc1, TemplateType.Word));
            //預設名稱
            TemplateForm.DefaultFileName = "StudentReportCardTemplateForGrade56";

            if (TemplateForm.ShowDialog() == DialogResult.OK)
            {
                foreach (var target in new int[] { 5, 6 })
                {
                    ReportConfiguration config = new Campus.Report.ReportConfiguration("ibshGradeYearReport.GradeYearReportCard.SY" + _SchoolYear + "S" + _Semester + ".G" + target);
                    config.Template = TemplateForm.Template;
                    config.Save();
                }
            }
        }
Esempio n. 4
0
        private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            string value = (string)comboBoxEx1.SelectedItem;

            if (value == "新增")
            {
                return;
            }
            //畫面內容(範本內容,預設樣式
            Campus.Report.TemplateSettingForm TemplateForm;
            if (custConfigs[current].Template == null)
            {
                custConfigs[current].Template = new Campus.Report.ReportTemplate(Properties.Resources.樣板, Campus.Report.TemplateType.Word);
            }
            TemplateForm = new Campus.Report.TemplateSettingForm(custConfigs[current].Template, new Campus.Report.ReportTemplate(Properties.Resources.樣板, Campus.Report.TemplateType.Word));
            //預設名稱
            TemplateForm.DefaultFileName = current + "樣板";
            if (TemplateForm.ShowDialog() == DialogResult.OK)
            {
                custConfigs[current].Template = TemplateForm.Template;
                custConfigs[current].Save();
            }
        }