WFProcessOperationHistoryService.cs 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. using LeaRun.Application.Entity.FlowManage;
  2. using LeaRun.Application.IService.FlowManage;
  3. using LeaRun.Data.Repository;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. namespace LeaRun.Application.Service.FlowManage
  10. {
  11. /// <summary>
  12. /// 版 本 6.1
  13. /// Copyright (c) 2013-2016 上海力软信息技术有限公司
  14. /// 创建人:陈彬彬
  15. /// 日 期:2016.03.18 15:54
  16. /// 描 述:工作流实例操作记录表操作(支持:SqlServer)
  17. /// </summary>
  18. public class WFProcessOperationHistoryService : RepositoryFactory, WFProcessOperationHistoryIService
  19. {
  20. #region 获取数据
  21. #endregion
  22. #region 提交数据
  23. /// <summary>
  24. /// 保存或更新实体对象
  25. /// </summary>
  26. /// <param name="keyValue"></param>
  27. /// <param name="entity"></param>
  28. public void SaveEntity(string keyValue,WFProcessOperationHistoryEntity entity)
  29. {
  30. try
  31. {
  32. if(string.IsNullOrEmpty(keyValue))
  33. {
  34. entity.Create();
  35. this.BaseRepository().Insert(entity);
  36. }
  37. else
  38. {
  39. entity.Modify(keyValue);
  40. this.BaseRepository().Update(entity);
  41. }
  42. }
  43. catch
  44. {
  45. throw;
  46. }
  47. }
  48. #endregion
  49. }
  50. }