Ejemplo n.º 1
0
        private void buttonExport_Click(object sender, EventArgs e)
        {
            UseWaitCursor = true;
            Application.DoEvents();

            try
            {

                if (saveEvidenceNotice == null)
                {
                    saveEvidenceNotice = new SaveEvidenceNotice();

                    saveEvidenceNotice.FilePath = Utility.GetFileSavePath() + Utility.BuilderFileName();
                }
                saveEvidenceNotice.Status = 1;
                SaveData();
                WordDocument doc = new WordDocument("先行登记保存证据通知书");
                doc.AddField("DocTitle", saveEvidenceNotice.DocTitle);
                doc.AddField("FieldECompanyName", saveEvidenceNotice.FieldECompanyName);
                doc.AddField("IllegalTypeName", saveEvidenceNotice.IllegalTypeName);
                doc.AddField("ToTime", saveEvidenceNotice.ToTime.ToString("yyyy年MM月dd日"));
                doc.AddField("QFirstPerson", saveEvidenceNotice.QFirstPerson);
                doc.AddFootField("DocManageArea", saveEvidenceNotice.DocManageArea);

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

            UseWaitCursor = false;
        }
Ejemplo n.º 2
0
 public frmSaveEvidenceNotice(SaveEvidenceNotice saveEvidenceNotice)
     : this()
 {
     this.saveEvidenceNotice = saveEvidenceNotice;
 }
Ejemplo n.º 3
0
        private void SaveData()
        {
            if (saveEvidenceNotice == null)
            {
                saveEvidenceNotice = new SaveEvidenceNotice();

                saveEvidenceNotice.FilePath = Utility.GetFileSavePath() + Utility.BuilderFileName();
            }

            GetEntity(saveEvidenceNotice);

            Company company = new Company
            {
                CompanyName = FieldECompanyName.Text,
            };
            InvokeUtil.SystemService.UpdateCompanyByName(company);

            InvokeUtil.SystemService.EntityUpdate(saveEvidenceNotice);
        }