KeywordObjects.cs 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. namespace LYFZ.WXLibrary
  6. {
  7. public class KeywordObjects
  8. {
  9. public KeywordObjects() {
  10. }
  11. public KeywordObjects(string keywordString)
  12. {
  13. string[] temps = keywordString.Split(',');
  14. if (temps.Length == 3)
  15. {
  16. this._FunctionCode = temps[0];
  17. this._Keyword = temps[1];
  18. try
  19. {
  20. if (temps[2].Trim() == "0")
  21. {
  22. this.IsEnabled = false;
  23. }
  24. else {
  25. this.IsEnabled = true;
  26. }
  27. }
  28. catch { }
  29. }
  30. }
  31. public KeywordObjects(System.Data.DataRow row)
  32. {
  33. this._FunctionCode = row["FunctionCode"].ToString();
  34. this._Keyword = row["Keyword"].ToString();
  35. if (row["isEnabled"].ToString() == "0")
  36. {
  37. this.IsEnabled = false;
  38. }
  39. else {
  40. this.IsEnabled = true;
  41. }
  42. }
  43. string _Keyword = "";
  44. /// <summary>
  45. /// 关键字
  46. /// </summary>
  47. public string Keyword
  48. {
  49. get { return _Keyword; }
  50. set { _Keyword = value; }
  51. }
  52. string _FunctionCode = "";
  53. /// <summary>
  54. /// 所属功能模块
  55. /// </summary>
  56. public string FunctionCode
  57. {
  58. get { return _FunctionCode; }
  59. set { _FunctionCode = value; }
  60. }
  61. bool _isEnabled = true;
  62. /// <summary>
  63. /// 是否启用
  64. /// </summary>
  65. public bool IsEnabled
  66. {
  67. get { return _isEnabled; }
  68. set { _isEnabled = value; }
  69. }
  70. }
  71. }