private void buttonExport_Click(object sender, EventArgs e) { UseWaitCursor = true; Application.DoEvents(); try { if (defenseRecords == null) { defenseRecords = new DefenseRecords(); defenseRecords.FilePath = Utility.GetFileSavePath() + Utility.BuilderFileName(); } defenseRecords.Status = 1; SaveData(); WordDocument doc = new WordDocument("当事人陈述申辩笔录"); doc.AddField("DefenseStartDateYear", defenseRecords.DefenseStartDate.Year.ToString()); doc.AddField("DefenseStartDateMonth", defenseRecords.DefenseStartDate.Month.ToString()); doc.AddField("DefenseStartDateDay", defenseRecords.DefenseStartDate.Day.ToString()); doc.AddField("DefenseStartDateHour", defenseRecords.DefenseStartDate.Hour.ToString()); doc.AddField("DefenseStartDateMinute", defenseRecords.DefenseStartDate.Minute.ToString()); doc.AddField("DefenseEndDateDay", defenseRecords.DefenseEndDate.Day.ToString()); doc.AddField("DefenseEndDateHour", defenseRecords.DefenseEndDate.Hour.ToString()); doc.AddField("DefenseEndDateMinute", defenseRecords.DefenseEndDate.Minute.ToString()); doc.AddField("Location", defenseRecords.Location); doc.AddField("DefenseUser", defenseRecords.DefenseUser); doc.AddField("Sex", defenseRecords.Sex); doc.AddField("Position", defenseRecords.Position); doc.AddField("WorkUnit", defenseRecords.WorkUnit); doc.AddField("Tel", defenseRecords.Tel); doc.AddField("Address", defenseRecords.Address); doc.AddField("ZipCode", defenseRecords.ZipCode); string UserNameStr = defenseRecords.UserName1 + (defenseRecords.UserName2 != "" ? "、" + defenseRecords.UserName2 : ""); doc.AddField("UserName1", UserNameStr); doc.AddField("UserName3", defenseRecords.UserName3); doc.AddField("LawUnit", defenseRecords.LawUnit); doc.AddField("ProblemResult1", defenseRecords.ProblemResult1); doc.AddField("ProblemResult2", defenseRecords.ProblemResult2); doc.AddField("ProblemResult3", defenseRecords.ProblemResult3); doc.AddField("CaseName", defenseRecords.CaseName); doc.AddField("ProblemUser1", defenseRecords.ProblemUser1); doc.AddField("ProblemUser2", defenseRecords.ProblemUser2); doc.AddField("ProblemUserCode1", defenseRecords.ProblemUserCode1); doc.AddField("ProblemUserCode2", defenseRecords.ProblemUserCode2); doc.AddField("ProblemResult4", defenseRecords.ProblemResult4); doc.AddField("ProblemContent", defenseRecords.ProblemContent); doc.AddFootField("DocManageArea", InvokeUtil.ActiveUser.FullName); OnNavigationRequest(new Maleos.NavigationRequestEventArgs("Maleos.Modules.OutputDocuemnt", new object[] { doc, "EnforceForm.frmDefenseRecords", defenseRecords.FilePath })); } catch (Exception ex) { CommonInvoke.ErrorMessageBox(ex); } UseWaitCursor = false; }
private void SaveData() { if (defenseRecords == null) { defenseRecords = new DefenseRecords(); defenseRecords.FilePath = Utility.GetFileSavePath() + Utility.BuilderFileName(); } GetEntity(defenseRecords); InvokeUtil.SystemService.EntityUpdate(defenseRecords); }
public frmEditDefenseRecords(DefenseRecords defenseRecords) : this() { this.defenseRecords = defenseRecords; }
/// <summary> /// 当事人陈诉申辩笔录 /// </summary> /// <param name="page">当前页</param> /// <param name="pageSize">显示记录数</param> /// <param name="beginDate">起始时间</param> /// <param name="endDate">结束时间</param> /// <returns>实体集合</returns> public EList<DefenseRecords> DefenseRecordsByDate(int page, int pageSize, DateTime beginDate, DateTime endDate) { try { DefenseRecords Obj = new DefenseRecords(); Obj.SystemService = this; return Obj.DefenseRecordsByDate(page, pageSize, beginDate, endDate); } catch (Exception ex) { throw ex; } }