private void SaveData() { if (putDown == null) { putDown = new PutDown(); putDown.FilePath = Utility.GetFileSavePath() + Utility.BuilderFileName(); } GetEntity(putDown); Officers officer1 = new Officers { OfficersName = Investigador1.Text, Position = InvestigadorIDC1.Text }; InvokeUtil.SystemService.UpdateOfficersByArgs(officer1); Officers officer2 = new Officers { OfficersName = Investigador2.Text, Position = InvestigadorIDC2.Text }; InvokeUtil.SystemService.UpdateOfficersByArgs(officer2); Company company = new Company { CompanyName = ProposerCompany.Text, CompanyAddress = ProposerAddress.Text, JuridicalPerson = LegalRepre.Text, JuridicalPersonSex = LegalRepreSex.Text, JuridicalPersonAge = LegalRepreAge.Text, }; InvokeUtil.SystemService.UpdateCompanyByName(company); Lawyer legalRepreAgent1 = new Lawyer { LawyerName = LegalRepreAgent1.Text, Sex = LegalRepreAgentSex1.Text, Age = LegalRepreAgentAge1.Text, Job = LegalRepreAgentJob1.Text }; InvokeUtil.SystemService.UpdateLawyer(legalRepreAgent1); Lawyer legalRepreAgent2 = new Lawyer { LawyerName = LegalRepreAgent2.Text, Sex = LegalRepreAgentSex2.Text, Age = LegalRepreAgentAge2.Text, Job = LegalRepreAgentJob2.Text }; InvokeUtil.SystemService.UpdateLawyer(legalRepreAgent2); NaturalPerson person = new NaturalPerson { PersonName = Proposer.Text, Sex = ProposerSex.Text, Age = ProposerAge.Text, Job = ProposerJob.Text }; InvokeUtil.SystemService.UpdateNaturalPersonByArgs(person); Lawyer proposerAgent1 = new Lawyer { LawyerName = ProposerAgent1.Text, Sex = ProposerAgentSex1.Text, Age = ProposerAgentAge1.Text, Job = ProposerAgentJob1.Text }; InvokeUtil.SystemService.UpdateLawyer(proposerAgent1); Lawyer proposerAgent2 = new Lawyer { LawyerName = ProposerAgen2.Text, Sex = ProposerAgentSex2.Text, Age = ProposerAgentAge2.Text, Job = ProposerAgentJob2.Text }; InvokeUtil.SystemService.UpdateLawyer(proposerAgent2); InvokeUtil.SystemService.EntityUpdate(putDown); }
private void buttonExport_Click(object sender, EventArgs e) { UseWaitCursor = true; Application.DoEvents(); try { if (putDown == null) { putDown = new PutDown(); putDown.FilePath = Utility.GetFileSavePath() + Utility.BuilderFileName(); } putDown.Status = 1; SaveData(); WordDocument doc = new WordDocument("听证笔录"); doc.AddField("CaseName", putDown.CaseName); doc.AddField("Organ", putDown.Organ); doc.AddField("OrganAddress", putDown.OrganAddress); doc.AddField("HearBeginDateYear", putDown.HearBeginDate.Year.ToString()); doc.AddField("HearBeginDateMonth", putDown.HearBeginDate.Month.ToString()); doc.AddField("HearBeginDateDay", putDown.HearBeginDate.Day.ToString()); doc.AddField("HearBeginDateHour", putDown.HearBeginDate.Hour.ToString()); doc.AddField("HearBeginDateMinute", putDown.HearBeginDate.Minute.ToString()); doc.AddField("HearEndDateDay", putDown.HearEndDate.Day.ToString()); doc.AddField("HearEndDateHour", putDown.HearEndDate.Hour.ToString()); doc.AddField("HearEndDateMinute", putDown.HearEndDate.Minute.ToString()); doc.AddField("CompereName", putDown.CompereName); doc.AddField("HearName", putDown.HearName); doc.AddField("SecretaryName", putDown.SecretaryName); doc.AddField("Investigador1", putDown.Investigador1); doc.AddField("InvestigadorIDC1", putDown.InvestigadorIDC1); doc.AddField("Investigador2", putDown.Investigador2); doc.AddField("InvestigadorIDC2", putDown.InvestigadorIDC2); doc.AddField("ProposerCompany", putDown.ProposerCompany); doc.AddField("ProposerAddress", putDown.ProposerAddress); doc.AddField("LegalRepre", putDown.LegalRepre); doc.AddField("LegalRepreSex", putDown.LegalRepreSex); doc.AddField("LegalRepreAge", putDown.LegalRepreAge.ToString()); doc.AddField("LegalRepreAgent1", putDown.LegalRepreAgent1); doc.AddField("LegalRepreAgentSex1", putDown.LegalRepreAgentSex1); doc.AddField("LegalRepreAgentAge1", putDown.LegalRepreAgentAge1.ToString()); doc.AddField("LegalRepreAgentJob1", putDown.LegalRepreAgentJob1); doc.AddField("LegalRepreAgent2", putDown.LegalRepreAgent2); doc.AddField("LegalRepreAgentSex2", putDown.LegalRepreAgentSex2); doc.AddField("LegalRepreAgentAge2", putDown.LegalRepreAgentAge2.ToString()); doc.AddField("LegalRepreAgentJob2", putDown.LegalRepreAgentJob2); doc.AddField("Proposer", putDown.Proposer); doc.AddField("ProposerSex", putDown.ProposerSex.ToString()); doc.AddField("ProposerAge", putDown.ProposerAge.ToString()); doc.AddField("ProposerJob", putDown.ProposerJob); doc.AddField("ProposerAgent1", putDown.ProposerAgent1); doc.AddField("ProposerAgentSex1", putDown.ProposerAgentSex1); doc.AddField("ProposerAgentAge1", putDown.ProposerAgentAge1.ToString()); doc.AddField("ProposerAgentJob1", putDown.ProposerAgentJob1); doc.AddField("ProposerAgen2", putDown.ProposerAgen2); doc.AddField("ProposerAgentSex2", putDown.ProposerAgentSex2); doc.AddField("ProposerAgentAge2", putDown.ProposerAgentAge2.ToString()); doc.AddField("ProposerAgentJob2", putDown.ProposerAgentJob2); doc.AddField("ThirdPerson", putDown.ThirdPerson); doc.AddField("OhterPerson", putDown.OhterPerson); doc.AddField("Record", putDown.Record); doc.AddField("ProposerOrAgent", putDown.ProposerOrAgent); OnNavigationRequest(new Maleos.NavigationRequestEventArgs("Maleos.Modules.OutputDocuemnt", new object[] { doc, "EnforceForm.frmPutDowns", putDown.FilePath })); } catch (Exception ex) { CommonInvoke.ErrorMessageBox(ex); } UseWaitCursor = false; }
public frmPutDown(PutDown putDown) : this() { this.putDown = putDown; }