You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
1.8 KiB

2 years ago
  1. using Entity.Sugar;
  2. using Newtonsoft.Json.Linq;
  3. using SqlSugar;
  4. using SqlSugar.Base;
  5. using System;
  6. using System.Collections.Generic;
  7. using System.Configuration;
  8. using System.Data;
  9. using System.Globalization;
  10. using System.IO;
  11. using System.Net;
  12. using System.Runtime.InteropServices;
  13. using System.Text;
  14. using System.Text.RegularExpressions;
  15. using System.Web;
  16. using System.Xml;
  17. using DocumentFormat.OpenXml.Wordprocessing;
  18. using DocumentFormat.OpenXml.Packaging;
  19. using System.Linq;
  20. using EasyBL.WebApi.Message;
  21. using Newtonsoft.Json;
  22. namespace EasyBL
  23. {
  24. public enum ActionType
  25. {
  26. , , , , ,
  27. 退, 退, 退, 退, 退
  28. }
  29. /// <summary>
  30. /// Common 的摘要描述
  31. /// </summary>
  32. public class BillLogs
  33. {
  34. public static Tuple<bool, string> InsertBillChangeLog(SqlSugarClient db, string strLogData, ActionType ActionType, string OrgID, string UserID)
  35. {
  36. var sMsg = "";
  37. try
  38. {
  39. do
  40. {
  41. var LogData = JsonConvert.DeserializeObject<OTB_OPM_BillChangeLog>(strLogData);
  42. LogData.OrgID = OrgID;
  43. LogData.ModifyUser = UserID;
  44. LogData.ModifyDate = DateTime.Now;
  45. LogData.Operation = ActionType.ToString();
  46. db.Insertable(LogData).IgnoreColumns( c => c.SN).ExecuteCommand();
  47. } while (false);
  48. return new Tuple<bool, string>(true, sMsg);
  49. }
  50. catch (Exception ex)
  51. {
  52. sMsg = Util.GetLastExceptionMsg(ex);
  53. return new Tuple<bool, string>(false, sMsg);
  54. }
  55. }
  56. }
  57. }