Guest User

Untitled

a guest
Jan 23rd, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.87 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4.  
  5. namespace DistrictAgent.Model
  6. {
  7. public class AttendanceRecord
  8. {
  9. #region .member variables.
  10. private Guid id = Guid.Empty;
  11. private School school;
  12. private string username;
  13. private DateTime dateCreated;
  14. private int school_year;
  15. private string term;
  16. private string week;
  17. private int g_P1_full_day;
  18. private int g_P2_full_day;
  19. private int g_P3_full_day;
  20. private int g_P4_full_day;
  21. private int g_P5_full_day;
  22. private int g_P6_full_day;
  23. private int g_P7_full_day;
  24. private int g_P1_half_day;
  25. private int g_P2_half_day;
  26. private int g_P3_half_day;
  27. private int g_P4_half_day;
  28. private int g_P5_half_day;
  29. private int g_P6_half_day;
  30. private int g_P7_half_day;
  31. private int b_P1_full_day;
  32. private int b_P2_full_day;
  33. private int b_P3_full_day;
  34. private int b_P4_full_day;
  35. private int b_P5_full_day;
  36. private int b_P6_full_day;
  37. private int b_P7_full_day;
  38. private int b_P1_half_day;
  39. private int b_P2_half_day;
  40. private int b_P3_half_day;
  41. private int b_P4_half_day;
  42. #endregion
  43.  
  44. /// <summary>
  45. /// gets or sets the school for this attendance record
  46. /// </summary>
  47. public virtual School School
  48. {
  49. get { return this.school; }
  50. set { this.school = value; }
  51. }
  52.  
  53. /// <summary>
  54. /// gets or sets the id of the attendance record
  55. /// </summary>
  56. public virtual Guid Id
  57. {
  58. get { return id; }
  59. set { id = value; }
  60. }
  61.  
  62. /// <summary>
  63. /// gets or sets the username of the attendance record
  64. /// </summary>
  65. public virtual string Username
  66. {
  67. get { return username; }
  68. set { username = value; }
  69. }
  70.  
  71. /// <summary>
  72. /// gets or sets the date the attendance record was created
  73. /// </summary>
  74. public virtual DateTime DateCreated
  75. {
  76. get { return dateCreated; }
  77. set { dateCreated = value; }
  78. }
  79.  
  80. public virtual int SchoolYear
  81. {
  82. get { return this.school_year; }
  83. set { this.school_year = value; }
  84. }
  85. /// <summary>
  86. /// gets or sets the term the attendance record was submitted
  87. /// </summary>
  88. public virtual string Term
  89. {
  90. get { return this.term; }
  91. set { this.term = value; }
  92. }
  93.  
  94. /// <summary>
  95. /// gets or sets the week in which the attendance record was submitted
  96. /// </summary>
  97. public virtual string Week
  98. {
  99. get { return this.week; }
  100. set { this.week = value; }
  101. }
  102.  
  103. /// <summary>
  104. /// gets or sets the P1 full day attendance for girls
  105. /// </summary>
  106. public virtual int G_P1_full_day
  107. {
  108. get { return g_P1_full_day; }
  109. set { g_P1_full_day = value; }
  110. }
  111.  
  112. /// <summary>
  113. /// gets or sets the p2 full day atttendance for girls
  114. /// </summary>
  115. public virtual int G_P2_full_day
  116. {
  117. get { return g_P2_full_day; }
  118. set { g_P2_full_day = value; }
  119. }
  120.  
  121. /// <summary>
  122. /// gets or sets the p3 full day attendane for girls
  123. /// </summary>
  124. public virtual int G_P3_full_day
  125. {
  126. get { return g_P3_full_day; }
  127. set { g_P3_full_day = value; }
  128. }
  129.  
  130. /// <summary>
  131. /// gets or sets the p4 full day attendane for girls
  132. /// </summary>
  133. public virtual int G_P4_full_day
  134. {
  135. get { return g_P4_full_day; }
  136. set { g_P4_full_day = value; }
  137. }
  138. /// <summary>
  139. /// gets or sets the p5 full day attendane for girls
  140. /// </summary>
  141. public virtual int G_P5_full_day
  142. {
  143. get { return g_P5_full_day; }
  144. set { g_P5_full_day = value; }
  145. }
  146.  
  147. /// <summary>
  148. /// gets or sets the p6 full day attendane for girls
  149. /// </summary>
  150. public virtual int G_P6_full_day
  151. {
  152. get { return g_P6_full_day; }
  153. set { g_P6_full_day = value; }
  154. }
  155.  
  156. /// <summary>
  157. /// gets or sets the p7 full day attendane for girls
  158. /// </summary>
  159. public virtual int G_P7_full_day
  160. {
  161. get { return g_P7_full_day; }
  162. set { g_P7_full_day = value; }
  163. }
  164.  
  165. public virtual int G_P1_half_day
  166. {
  167. get { return g_P1_half_day; }
  168. set { g_P1_half_day = value; }
  169. }
  170.  
  171. public virtual int G_P2_half_day
  172. {
  173. get { return g_P2_half_day; }
  174. set { g_P2_half_day = value; }
  175. }
  176.  
  177. public virtual int G_P3_half_day
  178. {
  179. get { return g_P3_half_day; }
  180. set { g_P3_half_day = value; }
  181. }
  182.  
  183. public virtual int G_P4_half_day
  184. {
  185. get { return g_P4_half_day; }
  186. set { g_P4_half_day = value; }
  187. }
  188.  
  189. public virtual int G_P5_half_day
  190. {
  191. get { return g_P5_half_day; }
  192. set { g_P5_half_day = value; }
  193. }
  194.  
  195. public virtual int G_P6_half_day
  196. {
  197. get { return g_P6_half_day; }
  198. set { g_P6_half_day = value; }
  199. }
  200.  
  201. public virtual int G_P7_half_day
  202. {
  203. get { return g_P7_half_day; }
  204. set { g_P7_half_day = value; }
  205. }
  206.  
  207. public virtual int B_P1_full_day
  208. {
  209. get { return b_P1_full_day; }
  210. set { b_P1_full_day = value; }
  211. }
  212.  
  213. public virtual int B_P2_full_day
  214. {
  215. get { return b_P2_full_day; }
  216. set { b_P2_full_day = value; }
  217. }
  218.  
  219. public virtual int B_P3_full_day
  220. {
  221. get { return b_P3_full_day; }
  222. set { b_P3_full_day = value; }
  223. }
  224.  
  225. public virtual int B_P4_full_day
  226. {
  227. get { return b_P4_full_day; }
  228. set { b_P4_full_day = value; }
  229. }
  230.  
  231. public virtual int B_P5_full_day
  232. {
  233. get { return b_P5_full_day; }
  234. set { b_P5_full_day = value; }
  235. }
  236.  
  237. public virtual int B_P6_full_day
  238. {
  239. get { return b_P6_full_day; }
  240. set { b_P6_full_day = value; }
  241. }
  242.  
  243. public virtual int B_P7_full_day
  244. {
  245. get { return b_P7_full_day; }
  246. set { b_P7_full_day = value; }
  247. }
  248.  
  249. public virtual int B_P1_half_day
  250. {
  251. get { return b_P1_half_day; }
  252. set { b_P1_half_day = value; }
  253. }
  254.  
  255. public virtual int B_P2_half_day
  256. {
  257. get { return b_P2_half_day; }
  258. set { b_P2_half_day = value; }
  259. }
  260.  
  261. public virtual int B_P3_half_day
  262. {
  263. get { return b_P3_half_day; }
  264. set { b_P3_half_day = value; }
  265. }
  266.  
  267. public virtual int B_P4_half_day
  268. {
  269. get { return b_P4_half_day; }
  270. set { b_P4_half_day = value; }
  271. }
  272. private int b_P5_half_day;
  273.  
  274. public virtual int B_P5_half_day
  275. {
  276. get { return b_P5_half_day; }
  277. set { b_P5_half_day = value; }
  278. }
  279. private int b_P6_half_day;
  280.  
  281. public virtual int B_P6_half_day
  282. {
  283. get { return b_P6_half_day; }
  284. set { b_P6_half_day = value; }
  285. }
  286. private int b_P7_half_day;
  287.  
  288. public virtual int B_P7_half_day
  289. {
  290. get { return b_P7_half_day; }
  291. set { b_P7_half_day = value; }
  292. }
  293.  
  294. private int f_teacher_full_day_monday;
  295.  
  296. public virtual int F_teacher_full_day_monday
  297. {
  298. get { return f_teacher_full_day_monday; }
  299. set { f_teacher_full_day_monday = value; }
  300. }
  301. private int f_teacher_full_day_tuesday;
  302.  
  303. public virtual int F_teacher_full_day_tuesday
  304. {
  305. get { return f_teacher_full_day_tuesday; }
  306. set { f_teacher_full_day_tuesday = value; }
  307. }
  308. private int f_teacher_full_day_wed;
  309.  
  310. public virtual int F_teacher_full_day_wed
  311. {
  312. get { return f_teacher_full_day_wed; }
  313. set { f_teacher_full_day_wed = value; }
  314. }
  315. private int f_teacher_full_day_thur;
  316.  
  317. public virtual int F_teacher_full_day_thur
  318. {
  319. get { return f_teacher_full_day_thur; }
  320. set { f_teacher_full_day_thur = value; }
  321. }
  322. private int f_teacher_full_day_fri;
  323.  
  324. public virtual int F_teacher_full_day_fri
  325. {
  326. get { return f_teacher_full_day_fri; }
  327. set { f_teacher_full_day_fri = value; }
  328. }
  329.  
  330. private int f_teacher_half_day_monday;
  331.  
  332. public virtual int F_teacher_half_day_monday
  333. {
  334. get { return f_teacher_half_day_monday; }
  335. set { f_teacher_half_day_monday = value; }
  336. }
  337. private int f_teacher_half_day_tuesday;
  338.  
  339. public virtual int F_teacher_half_day_tuesday
  340. {
  341. get { return f_teacher_half_day_tuesday; }
  342. set { f_teacher_half_day_tuesday = value; }
  343. }
  344. private int f_teacher_half_day_wed;
  345.  
  346. public virtual int F_teacher_half_day_wed
  347. {
  348. get { return f_teacher_half_day_wed; }
  349. set { f_teacher_half_day_wed = value; }
  350. }
  351. private int f_teacher_half_day_thur;
  352.  
  353. public virtual int F_teacher_half_day_thur
  354. {
  355. get { return f_teacher_half_day_thur; }
  356. set { f_teacher_half_day_thur = value; }
  357. }
  358. private int f_teacher_half_day_fri;
  359.  
  360. public virtual int F_teacher_half_day_fri
  361. {
  362. get { return f_teacher_half_day_fri; }
  363. set { f_teacher_half_day_fri = value; }
  364. }
  365.  
  366. private int m_teacher_full_day_monday;
  367.  
  368. public virtual int M_teacher_full_day_monday
  369. {
  370. get { return m_teacher_full_day_monday; }
  371. set { m_teacher_full_day_monday = value; }
  372. }
  373. private int m_teacher_full_day_tuesday;
  374.  
  375. public virtual int M_teacher_full_day_tuesday
  376. {
  377. get { return m_teacher_full_day_tuesday; }
  378. set { m_teacher_full_day_tuesday = value; }
  379. }
  380. private int m_teacher_full_day_wed;
  381.  
  382. public virtual int M_teacher_full_day_wed
  383. {
  384. get { return m_teacher_full_day_wed; }
  385. set { m_teacher_full_day_wed = value; }
  386. }
  387. private int m_teacher_full_day_thur;
  388.  
  389. public virtual int M_teacher_full_day_thur
  390. {
  391. get { return m_teacher_full_day_thur; }
  392. set { m_teacher_full_day_thur = value; }
  393. }
  394. private int m_teacher_full_day_fri;
  395.  
  396. public virtual int M_teacher_full_day_fri
  397. {
  398. get { return m_teacher_full_day_fri; }
  399. set { m_teacher_full_day_fri = value; }
  400. }
  401.  
  402. private int m_teacher_half_day_monday;
  403.  
  404. public virtual int M_teacher_half_day_monday
  405. {
  406. get { return m_teacher_half_day_monday; }
  407. set { m_teacher_half_day_monday = value; }
  408. }
  409. private int m_teacher_half_day_tuesday;
  410.  
  411. public virtual int M_teacher_half_day_tuesday
  412. {
  413. get { return m_teacher_half_day_tuesday; }
  414. set { m_teacher_half_day_tuesday = value; }
  415. }
  416. private int m_teacher_half_day_wed;
  417.  
  418. public virtual int M_teacher_half_day_wed
  419. {
  420. get { return m_teacher_half_day_wed; }
  421. set { m_teacher_half_day_wed = value; }
  422. }
  423. private int m_teacher_half_day_thur;
  424.  
  425. public virtual int M_teacher_half_day_thur
  426. {
  427. get { return m_teacher_half_day_thur; }
  428. set { m_teacher_half_day_thur = value; }
  429. }
  430. private int m_teacher_half_day_fri;
  431.  
  432. public virtual int M_teacher_half_day_fri
  433. {
  434. get { return m_teacher_half_day_fri; }
  435. set { m_teacher_half_day_fri = value; }
  436. }
  437.  
  438. /// <summary>
  439. ///
  440. /// </summary>
  441. /// <param name="value"></param>
  442. /// <returns></returns>
  443. public virtual int GetAvgAttendance(int value)
  444. {
  445. if (value == 0)
  446. return 0;
  447.  
  448. return Convert.ToInt32(value / (double)5);
  449. //return 0;
  450.  
  451. }
  452. }
  453. }
Add Comment
Please, Sign In to add comment