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

            try
            {
                if (punishmentDecisionUnit == null)
                {
                    punishmentDecisionUnit = new PunishmentDecisionUnit();

                    punishmentDecisionUnit.FilePath = Utility.GetFileSavePath() + Utility.BuilderFileName();
                }
                punishmentDecisionUnit.Status = 1;
                SaveData();
                WordDocument doc = new WordDocument("行政处罚决定书");
                doc.AddField("DocTitle", punishmentDecisionUnit.DocTitle);
                doc.AddField("PutOnRecordCaseName", punishmentDecisionUnit.PutOnRecordCaseName);
                doc.AddField("FieldEAddress", punishmentDecisionUnit.FieldEAddress);
                doc.AddField("FieldEPeopleZio", punishmentDecisionUnit.FieldEPeopleZio);
                doc.AddField("FieldEFName", punishmentDecisionUnit.FieldEFName);
                doc.AddField("FieldEPosition", punishmentDecisionUnit.FieldEPosition);
                doc.AddField("FieldEPeoplePhone", punishmentDecisionUnit.FieldEPeoplePhone);
                doc.AddField("IllegalEvidence", punishmentDecisionUnit.IllegalEvidence);
                doc.AddField("IllegalProvisions", punishmentDecisionUnit.IllegalProvisions);
                doc.AddField("According", punishmentDecisionUnit.According);
                doc.AddField("PunishmentAmount", punishmentDecisionUnit.PunishmentAmount);
                doc.AddField("BankName", punishmentDecisionUnit.BankName);
                doc.AddField("BankID", punishmentDecisionUnit.BankID);
                doc.AddField("ReconsiderationUnitName1", punishmentDecisionUnit.ReconsiderationUnitName1);
                doc.AddField("ReconsiderationUnitName2", punishmentDecisionUnit.ReconsiderationUnitName2);
                doc.AddField("LitigationUnitName", punishmentDecisionUnit.LitigationUnitName);
                doc.AddFootField("DocManageArea", punishmentDecisionUnit.DocManageArea);

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

            UseWaitCursor = false;
        }
コード例 #2
0
 public frmPunishmentDecisionUnit(PunishmentDecisionUnit punishmentDecisionUnit)
     : this()
 {
     this.punishmentDecisionUnit = punishmentDecisionUnit;
 }
コード例 #3
0
        private void SaveData()
        {
            if (punishmentDecisionUnit == null)
            {
                punishmentDecisionUnit = new PunishmentDecisionUnit();

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

            Company company = new Company
            {
                CompanyName = PutOnRecordCaseName.Text,
                CompanyAddress = FieldEAddress.Text,
                CompanyPost = FieldEPeopleZio.Text,
                JuridicalPerson = FieldEFName.Text,
                JuridicalPersonJob = FieldEPosition.Text,
                Mobile = FieldEPeoplePhone.Text
            };
            InvokeUtil.SystemService.UpdateCompanyByName(company);
            Bank bank = new Bank { BankName = BankName.Text, Account = BankID.Text };
            InvokeUtil.SystemService.UpdateBankByNameAccount(bank);

            InvokeUtil.SystemService.EntityUpdate(punishmentDecisionUnit);
        }