private void buttonExport_Click(object sender, EventArgs e) { UseWaitCursor = true; Application.DoEvents(); try { if (orderDeadlineReform == null) { orderDeadlineReform = new OrderDeadlineReform(); orderDeadlineReform.FilePath = Utility.GetFileSavePath() + Utility.BuilderFileName(); } orderDeadlineReform.Status = 1; SaveData(); WordDocument doc = new WordDocument("责令限期整改指令书"); doc.AddField("DocTitle", orderDeadlineReform.DocTitle); doc.AddField("OrderCompany", orderDeadlineReform.OrderCompany); doc.AddField("Matter", orderDeadlineReform.Matter); doc.AddField("MatterCount", orderDeadlineReform.MatterCount); doc.AddField("ReformDate", orderDeadlineReform.ReformDate.ToString("yyyy年M月d日")); doc.AddField("GovArea", orderDeadlineReform.GovArea); doc.AddField("ManageArea", orderDeadlineReform.ManageArea); doc.AddField("CourtArea", orderDeadlineReform.CourtArea); doc.AddFootField("OfficerName1", orderDeadlineReform.OfficerName1); doc.AddFootField("CID1", orderDeadlineReform.CID1); doc.AddFootField("OfficerName2", orderDeadlineReform.OfficerName2); doc.AddFootField("CID2", orderDeadlineReform.CID2); doc.AddFootField("DocManageArea", orderDeadlineReform.DocManageArea); //doc.AddFootField("DocDate", orderDeadlineReform.DocDate.ToString("yyyy年M月d日")); //OutputDocuemnt frm = new OutputDocuemnt(doc); //frm.OpenWindow(this); OnNavigationRequest(new Maleos.NavigationRequestEventArgs("Maleos.Modules.OutputDocuemnt", new object[] { doc, "EnforceForm.frmOrderDeadlineReforms", orderDeadlineReform.FilePath })); } catch (Exception ex) { CommonInvoke.ErrorMessageBox(ex); } UseWaitCursor = false; }
public frmReformReView(OrderDeadlineReform orderDeadlineReform) : this() { this.orderDeadlineReform = orderDeadlineReform; }
public frmOrderDeadlineReform(OrderDeadlineReform orderDeadlineReform) : this() { this.orderDeadlineReform = orderDeadlineReform; }
private void SaveData() { if (orderDeadlineReform == null) { orderDeadlineReform = new OrderDeadlineReform(); orderDeadlineReform.FilePath = Utility.GetFileSavePath() + Utility.BuilderFileName(); } GetEntity(orderDeadlineReform); Company company = new Company { CompanyName = OrderCompany.Text, }; InvokeUtil.SystemService.UpdateCompanyByName(company); Officers officer1 = new Officers { OfficersName = OfficerName1.Text, CID = CID1.Text }; InvokeUtil.SystemService.UpdateOfficersByArgs(officer1); Officers officer2 = new Officers { OfficersName = OfficerName2.Text, CID = CID2.Text }; InvokeUtil.SystemService.UpdateOfficersByArgs(officer2); InvokeUtil.SystemService.EntityUpdate(orderDeadlineReform); }