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

            try
            {
                if (forceMeasureDecision == null)
                {
                    forceMeasureDecision = new ForceMeasureDecision();
                    forceMeasureDecision.FilePath = Utility.GetFileSavePath() + Utility.BuilderFileName();
                }

                forceMeasureDecision.Status = 1;
                SaveData();
                WordDocument doc = new WordDocument("强制措施决定书");
                doc.AddField("DocTitle", forceMeasureDecision.DocTitle);
                doc.AddField("CompanyName", forceMeasureDecision.CompanyName);
                doc.AddField("Matter", forceMeasureDecision.Matter);
                doc.AddField("Accord", forceMeasureDecision.Accord);
                doc.AddField("EnforceMea", forceMeasureDecision.EnforceMea);
                doc.AddField("GovArea", forceMeasureDecision.GovArea);
                doc.AddField("ManageArea", forceMeasureDecision.ManageArea);
                doc.AddField("CourtArea", forceMeasureDecision.CourtArea);
                doc.AddFootField("DocManageArea", forceMeasureDecision.DocManageArea);
                doc.AddFootField("DocDate", forceMeasureDecision.DocDate.ToString("yyyy年M月d日"));
                //OutputDocuemnt frm = new OutputDocuemnt(doc);
                //frm.OpenWindow(this);
                OnNavigationRequest(new Maleos.NavigationRequestEventArgs("Maleos.Modules.OutputDocuemnt",
                    new object[] { doc, "EnforceForm.frmForceMeasureDecisions", forceMeasureDecision.FilePath }));
            }
            catch (Exception ex)
            {
                CommonInvoke.ErrorMessageBox(ex);
            }

            UseWaitCursor = false;
        }
Example #2
0
 public frmForceMeasureDecision(ForceMeasureDecision forceMeasureDecision)
     : this()
 {
     this.forceMeasureDecision = forceMeasureDecision;
 }
Example #3
0
        private void SaveData()
        {
            UseWaitCursor = true;
            Application.DoEvents();

            try
            {
                if (forceMeasureDecision == null) {
                    forceMeasureDecision = new ForceMeasureDecision();
                    forceMeasureDecision.FilePath = Utility.GetFileSavePath() + Utility.BuilderFileName();
                }

                GetEntity(forceMeasureDecision);

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

                InvokeUtil.SystemService.EntityUpdate(forceMeasureDecision);
                //CloseWindow();
            }
            catch (Exception ex)
            {
                CommonInvoke.ErrorMessageBox(ex);
            }

            UseWaitCursor = false;
        }