示例#1
0
        private void buttonExport_Click(object sender, EventArgs e)
        {
            UseWaitCursor = true;
            Application.DoEvents();

            try
            {

                if (punishmentDiscussRecord == null)
                {
                    punishmentDiscussRecord = new PunishmentDiscussRecord();

                    punishmentDiscussRecord.FilePath = Utility.GetFileSavePath() + Utility.BuilderFileName();
                }
                punishmentDiscussRecord.Status = 1;
                SaveData();
                WordDocument doc = new WordDocument("行政处罚集体讨论记录");
                doc.AddField("PutOnRecordCaseName", punishmentDiscussRecord.PutOnRecordCaseName);
                doc.AddField("DiscussDate", punishmentDiscussRecord.DiscussDate.ToString("yyyy年MM月dd日"));
                doc.AddField("DiscussAddress", punishmentDiscussRecord.DiscussAddress);
                doc.AddField("HostName", punishmentDiscussRecord.HostName);
                doc.AddField("ReportName", punishmentDiscussRecord.ReportName);
                doc.AddField("RecordUserName", punishmentDiscussRecord.RecordUserName);
                doc.AddField("PDRPeople1", punishmentDiscussRecord.PDRPeople1);
                doc.AddField("PDRPeople2", punishmentDiscussRecord.PDRPeople2);
                doc.AddField("DiscussContent", punishmentDiscussRecord.DiscussContent);
                doc.AddField("RecordContent", punishmentDiscussRecord.RecordContent);
                doc.AddField("Conclusion", punishmentDiscussRecord.Conclusion);
                //doc.AddFootField("FirstPageTest", "测试");
                //doc.AddFootField("Test", "测试");

                OnNavigationRequest(new Maleos.NavigationRequestEventArgs("Maleos.Modules.OutputDocuemnt",
                    new object[] { doc, "EnforceForm.frmPunishmentDiscussRecords", punishmentDiscussRecord.FilePath }));
            }
            catch (Exception ex)
            {
                CommonInvoke.ErrorMessageBox(ex);
            }

            UseWaitCursor = false;
        }
示例#2
0
 public frmPunishmentDiscussRecord(PunishmentDiscussRecord punishmentDiscussRecord)
     : this()
 {
     this.punishmentDiscussRecord = punishmentDiscussRecord;
 }
示例#3
0
        private void SaveData()
        {
            if (punishmentDiscussRecord == null)
            {
                punishmentDiscussRecord = new PunishmentDiscussRecord();

                punishmentDiscussRecord.FilePath = Utility.GetFileSavePath() + Utility.BuilderFileName();
            }
            GetEntity(punishmentDiscussRecord);

            InvokeUtil.SystemService.EntityUpdate(punishmentDiscussRecord);
        }