地铁二期项目正式开始

MsgHelper.cs 2.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. using System;
  2. using System.Collections.Generic;
  3. using System.IO;
  4. using System.Linq;
  5. using System.Net;
  6. using System.Text;
  7. using System.Security.Cryptography;
  8. using System.Net.Http;
  9. using System.Net.Http.Headers;
  10. using System.Configuration;
  11. namespace YTSoft.BaseCallCenter.MVCWeb.Commons
  12. {
  13. public class MsgHelper
  14. {
  15. public static BLL.T_SMS_InternalMessages mesbll = new BLL.T_SMS_InternalMessages();
  16. public static bool AddInternalMessagesInfo(string title, string content, string receiveUserCode, string sendUserCode, int smstop=0,
  17. string workorderid = "", string workordercode = "")
  18. {
  19. if (!string.IsNullOrWhiteSpace(title) || !string.IsNullOrWhiteSpace(receiveUserCode) || !string.IsNullOrWhiteSpace(sendUserCode))
  20. {
  21. Model.T_SMS_InternalMessages model = new Model.T_SMS_InternalMessages();
  22. model.SMS_Title = title;//标题
  23. model.SMS_Content = content;//内容
  24. model.SMS_ReceiveUserCode = receiveUserCode;//接收人
  25. model.SMS_SendUserCode = sendUserCode;//发送人
  26. model.SMS_IsRead = 0;//是否阅读
  27. model.SMS_SendTime = DateTime.Now;
  28. model.SMS_IsDelete = 0;
  29. model.SMS_Order = 0;//排序
  30. model.SMS_IsTop = smstop;
  31. model.SMS_Type = 0;//状态
  32. model.F_WorkOrderId = workorderid;
  33. if (string.IsNullOrEmpty(workordercode))
  34. model.F_WorkOrderCode = workorderid;
  35. else
  36. model.F_WorkOrderCode = workordercode;
  37. int n = mesbll.Add(model);
  38. if (n > 0)
  39. {
  40. return true;
  41. }
  42. else
  43. {
  44. return false;
  45. }
  46. }
  47. else
  48. {
  49. return false;
  50. }
  51. }
  52. }
  53. }