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.

163 lines
4.8 KiB

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Data;
  4. using System.Linq;
  5. using System.Reflection;
  6. using System.Text;
  7. using Newtonsoft.Json.Linq;
  8. using OT.COM.LogisticsUtil;
  9. using OT.COM.SignalerMessage;
  10. using SoldierData;
  11. using OT.COM.ArsenalDB;
  12. namespace CounsellorBL
  13. {
  14. /*
  15. // CMD code Template
  16. public CResponseMessage OOXX(CRequestMessage i_crm)
  17. {
  18. CResponseMessage crm = null;
  19. string sMsg = null;
  20. try
  21. {
  22. do
  23. {
  24. Dictionary<string, object> dicFormData = null;
  25. CResponseMessage crmCheckToken = checkTokenWithCRequestMessage(i_crm, out dicFormData);
  26. if (EResponseResult.RR_FALSE == crmCheckToken.RESULT)
  27. {
  28. sMsg = crmCheckToken.MSG;
  29. break;
  30. }
  31. }
  32. while(false);
  33. }
  34. catch(Exception ex)
  35. {
  36. sMsg = new Util().GetLastExceptionMsg(ex);
  37. }
  38. if (null != sMsg)
  39. {
  40. crm = new CErrorResponseMessage(sMsg, i_crm);
  41. }
  42. return crm;
  43. }
  44. */
  45. public partial class BLServiceBase : DBService
  46. {
  47. /// <summary>
  48. /// Get Selection option - Get PK/f_s_name as key/value
  49. /// </summary>
  50. /// <param name="i_crm"></param>
  51. /// <returns></returns>
  52. //public CResponseMessage SelectOptions(CRequestMessage i_crm)
  53. //{
  54. // CResponseMessage crm = null;
  55. // string sMsg = null;
  56. // try
  57. // {
  58. // do
  59. // {
  60. // string sEntityName = _fetchString(i_crm, BLWording.CMDENTITYTYPE);
  61. // if (null == sEntityName)
  62. // {
  63. // sMsg = "NO MATCHED ENTITY";
  64. // break;
  65. // }
  66. // Dictionary<string, object> dicFormData = null;
  67. // CResponseMessage crmCheckToken = checkTokenWithCRequestMessage(i_crm, out dicFormData);
  68. // if (EResponseResult.RR_FALSE == crmCheckToken.RESULT)
  69. // {
  70. // sMsg = crmCheckToken.MSG;
  71. // break;
  72. // }
  73. // //sMsg = oc.GetObjects(string.Format("tb_{0}", sEntityName), out o_olRes);
  74. // object oWhere = null;
  75. // sMsg = new ClassHelper().GetInstByClassName(sEntityName, out oWhere);
  76. // if (null != sMsg)
  77. // {
  78. // break;
  79. // }
  80. // //EntityBase ebWhere = oWhere as EntityBase;
  81. // Command cSelect = Command.SetupSelectCmd(GetMasterDBTableInfo(oWhere.GetType()), null, null);
  82. // QueryDataTable qdt = this.adbm.RunQuery(cSelect);
  83. // if (null != sMsg)
  84. // {
  85. // break;
  86. // }
  87. // DataTable dt = qdt.DATA;
  88. // crm = new CSuccessResponseMessage(null, i_crm);
  89. // List<Dictionary<string, object>> ldic = new List<Dictionary<string, object>>();
  90. // foreach (DataRow dr in dt.Rows)
  91. // {
  92. // Dictionary<string, object> dicTemp = new Dictionary<string, object>();
  93. // foreach (DataColumn dc in dt.Columns)
  94. // {
  95. // if (dr[dc.ColumnName] is DBNull)
  96. // {
  97. // dicTemp.Add(dc.ColumnName, null);
  98. // }
  99. // else
  100. // {
  101. // dicTemp.Add(dc.ColumnName, dr[dc.ColumnName]);
  102. // }
  103. // }
  104. // ldic.Add(dicTemp);
  105. // }
  106. // crm.DATA.Add(BLWording.ENTITYS, ldic);
  107. // }
  108. // while (false);
  109. // }
  110. // catch (Exception ex)
  111. // {
  112. // sMsg = new Util().GetLastExceptionMsg(ex);
  113. // }
  114. // if (null != sMsg)
  115. // {
  116. // crm = new CResponseMessage(i_crm) { RESULT = EResponseResult.RR_FALSE, MSG = sMsg };
  117. // }
  118. // return crm;
  119. //}
  120. //protected tb_role getRole(string i_sRoleName)
  121. //{
  122. // tb_role rRes = null;
  123. // rRes = msdbMaster.RunQuerySingleORM<tb_role>(Command.SetupSelectCmd(null, new tb_role() { f_s_name = i_sRoleName }));
  124. // return rRes;
  125. //}
  126. }
  127. }