您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

109 行
2.1 KiB

  1. /* Describtion : Class for Data Send From Client / Server
  2. * Company : Wuxi Xinje
  3. * Author : Somuns
  4. * DateTime : 2021/1/18
  5. */
  6. using System;
  7. using System.Collections.Generic;
  8. using System.Data;
  9. namespace StuMgmLib.MyNameSpace
  10. {
  11. public class Info
  12. {
  13. internal const Int16 tokenMaxCount = 32767;
  14. internal static Dictionary<short, int> myToken = new Dictionary<short, int>();
  15. }
  16. #region ClientClass
  17. public enum ClientFunc
  18. {
  19. VerifyLogin = 1,
  20. GetCourseInfo = 2,
  21. GetUserCourseInfo = 3,
  22. }
  23. public enum LvErr
  24. {
  25. NotFound = -1,
  26. Error = -2,
  27. Admin = 1,
  28. Teacher = 2,
  29. Student = 3,
  30. }
  31. [Serializable]
  32. public class ClientRequest
  33. {
  34. public ClientFunc Func;
  35. public object Object;
  36. public ClientRequest(ClientFunc func, object obj)
  37. {
  38. Func = func;
  39. Object = obj;
  40. }
  41. }
  42. [Serializable]
  43. public class UserInfo
  44. {
  45. public short Account;
  46. public string Password;
  47. public Int16 Token;
  48. public LvErr UserLev;
  49. public UserInfo(short account, string password) // Changed
  50. {
  51. Account = account;
  52. Password = password;
  53. }
  54. }
  55. [Serializable]
  56. public class CourseInfo
  57. {
  58. public short Id;
  59. public short Pid;
  60. public int Time;
  61. public string Name;
  62. public string Content;
  63. }
  64. [Serializable]
  65. public enum CourseStatusEnum
  66. {
  67. //lll,
  68. //...//
  69. }
  70. [Serializable]
  71. public class UserCourseInfo
  72. {
  73. public short JobId;//工号
  74. public string Name;//姓名
  75. public string Status;
  76. // ..public DateTime Entry;
  77. public string Details;//信息描述
  78. }
  79. #endregion
  80. #region ServerClass
  81. [Serializable]
  82. public class ServerResponse
  83. {
  84. public LvErr Lev;
  85. public int Token;
  86. //public string CourseStatus;
  87. public object Object;
  88. //public ServerResponse(object obj)
  89. //{
  90. // Object = obj;
  91. //}
  92. }
  93. #endregion
  94. }