private void buttonExport_Click(object sender, EventArgs e) { UseWaitCursor = true; Application.DoEvents(); try { if (noticeOfEnquiry == null) { noticeOfEnquiry = new NoticeOfEnquiry(); noticeOfEnquiry.FilePath = Utility.GetFileSavePath() + Utility.BuilderFileName(); } noticeOfEnquiry.Status = 1; SaveData(); WordDocument doc = new WordDocument("询问通知书"); doc.AddField("DocTitle", noticeOfEnquiry.DocTitle); doc.AddField("CompanyName", noticeOfEnquiry.CompanyName); doc.AddField("IllegalTypeName", noticeOfEnquiry.IllegalTypeName); doc.AddField("ToDateTimeYear", noticeOfEnquiry.ToDateTime.Year.ToString()); doc.AddField("ToDateTimeMonth", noticeOfEnquiry.ToDateTime.Month.ToString()); doc.AddField("ToDateTimeDay", noticeOfEnquiry.ToDateTime.Day.ToString()); string Cord = ""; //if (noticeOfEnquiry.IfID == true) // Cord += "√ 身份证 "; //if (noticeOfEnquiry.IfBusinessLicense == true) // Cord += "√ 营业执照 "; //if (noticeOfEnquiry.IfLawID == true) // Cord += "√ 法定代表人身份证明 "; //if (noticeOfEnquiry.IfOther == true) // Cord += "√ " + noticeOfEnquiry.OtherDocument; if (noticeOfEnquiry.IfID == true) Cord += "<font style=\"font-family:fangsong_GB2312;font-size:12pz;line-height:26px;\">√ 身份证</font><br/>"; if (noticeOfEnquiry.IfBusinessLicense == true) Cord += "<font style=\"font-family:fangsong_GB2312;font-size:12pz;line-height:26px;\">√ 营业执照</font><br/>"; if (noticeOfEnquiry.IfLawID == true) Cord += "<font style=\"font-family:fangsong_GB2312;font-size:12pz;line-height:26px;\">√ 法定代表人身份证明</font><br/>"; if (noticeOfEnquiry.IfOther == true) Cord += "<font style=\"font-family:fangsong_GB2312;font-size:12pz;line-height:26px;\">√ " + noticeOfEnquiry.OtherDocument + "</font>"; doc.AddField("Cord", Cord, EFieldType.Html); doc.AddField("DetpAddress", noticeOfEnquiry.DetpAddress); doc.AddField("DetpName", noticeOfEnquiry.DetpName); doc.AddField("DetpPhone", noticeOfEnquiry.DetpPhone); doc.AddFootField("DocManageArea", noticeOfEnquiry.DocManageArea); //doc.AddFootField("FirstPageTest", "测试"); //doc.AddFootField("Test", "测试"); OnNavigationRequest(new Maleos.NavigationRequestEventArgs("Maleos.Modules.OutputDocuemnt", new object[] { doc, "EnforceForm.frmNoticeOfEnquirys", noticeOfEnquiry.FilePath })); } catch (Exception ex) { CommonInvoke.ErrorMessageBox(ex); } UseWaitCursor = false; }
public frmNoticeOfEnquiry(NoticeOfEnquiry noticeOfEnquiry) : this() { this.noticeOfEnquiry = noticeOfEnquiry; }
private void SaveData() { if (noticeOfEnquiry == null) { noticeOfEnquiry = new NoticeOfEnquiry(); noticeOfEnquiry.FilePath = Utility.GetFileSavePath() + Utility.BuilderFileName(); } GetEntity(noticeOfEnquiry); Company company = new Company { CompanyName = CompanyName.Text, }; InvokeUtil.SystemService.UpdateCompanyByName(company); InvokeUtil.SystemService.EntityUpdate(noticeOfEnquiry); }