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

            try
            {
                if (forceMeasureDecisionApprove == null)
                {
                    forceMeasureDecisionApprove = new ForceMeasureDecisionApprove();
                    forceMeasureDecisionApprove.FilePath = Utility.GetFileSavePath() + Utility.BuilderFileName();
                }
                forceMeasureDecisionApprove.Status = 1;
                SaveData();

                WordDocument doc = new WordDocument("强制措施决定审批表");
                doc.Entity = forceMeasureDecisionApprove;
                doc.AddField("Party", forceMeasureDecisionApprove.Party);
                doc.AddField("PartyAddress", forceMeasureDecisionApprove.PartyAddress);
                doc.AddField("LegalRepre", forceMeasureDecisionApprove.LegalRepre);
                doc.AddField("Tel", forceMeasureDecisionApprove.Tel);
                doc.AddField("Matter", forceMeasureDecisionApprove.Matter);
                doc.AddField("Accord", forceMeasureDecisionApprove.Accord);
                doc.AddField("Supervise", forceMeasureDecisionApprove.Supervise);
                doc.AddField("SuperviseDate", forceMeasureDecisionApprove.SuperviseDate.ToString("yyyy年M月d日"));
                doc.AddField("Undertake", forceMeasureDecisionApprove.Undertake);
                doc.AddField("Principal", forceMeasureDecisionApprove.Principal);
                doc.AddField("PrincipalDate", forceMeasureDecisionApprove.PrincipalDate.ToString("yyyy年M月d日"));
                //OutputDocuemnt frm = new OutputDocuemnt(doc);
                //frm.OpenWindow(this);
                OnNavigationRequest(new Maleos.NavigationRequestEventArgs("Maleos.Modules.OutputDocuemnt",
                    new object[] { doc, "EnforceForm.frmForceMeasureDecisionApproves", forceMeasureDecisionApprove.FilePath }));
            }
            catch (Exception ex)
            {
                CommonInvoke.ErrorMessageBox(ex);
            }

            UseWaitCursor = false;
        }
Ejemplo n.º 2
0
 public frmForceMeasureDecisionApprove(ForceMeasureDecisionApprove forceMeasureDecisionApprove)
     : this()
 {
     this.forceMeasureDecisionApprove = forceMeasureDecisionApprove;
 }
Ejemplo n.º 3
0
        void SaveData()
        {
            UseWaitCursor = true;
            Application.DoEvents();

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

                GetEntity(forceMeasureDecisionApprove);

                Company company = new Company
                {
                    CompanyName = Party.Text,
                    CompanyAddress = PartyAddress.Text,
                    JuridicalPerson = LegalRepre.Text,
                    Mobile = Tel.Text
                };
                InvokeUtil.SystemService.UpdateCompanyByName(company);

                InvokeUtil.SystemService.EntityUpdate(forceMeasureDecisionApprove);

            }
            catch (Exception ex)
            {
                CommonInvoke.ErrorMessageBox(ex);
            }

            UseWaitCursor = false;
        }