PageRenderTime 52ms CodeModel.GetById 12ms RepoModel.GetById 1ms app.codeStats 0ms

/BaliEnterpriseSystems/BaliEnterpriseSystems/SchedulesInfo.aspx.cs

https://github.com/sirivedula/BEST
C# | 429 lines | 375 code | 46 blank | 8 comment | 56 complexity | ce955481a5271cdd83f9561459a36c25 MD5 | raw file
  1. using System;
  2. using System.Collections;
  3. using System.Configuration;
  4. using System.Data;
  5. using System.Linq;
  6. using System.Web;
  7. using System.Web.Security;
  8. using System.Web.UI;
  9. using System.Web.UI.WebControls;
  10. using System.Web.UI.WebControls.WebParts;
  11. using System.Web.UI.HtmlControls;
  12. using System.Xml.Linq;
  13. using System.Text;
  14. using BaliEnterpriseSystems.BestObjects;
  15. using System.Collections.Generic;
  16. using System.Data.OleDb;
  17. namespace BaliEnterpriseSystems
  18. {
  19. public partial class SchedulesInfo : System.Web.UI.Page
  20. {
  21. protected void Page_Load(object sender, EventArgs e)
  22. {
  23. }
  24. protected void Page_LoadComplete(object sender, EventArgs e)
  25. {
  26. if (HttpContext.Current.Session["CurrentUser"] == null)
  27. {
  28. Response.Redirect("Logout.aspx");
  29. }
  30. string ms = Request.QueryString["ms"];
  31. ltrMScript.Text = Utils.MenuSelectScript(ms);
  32. if (!Utils.User.UserRoleByName("5.Schedules").allowView)
  33. {
  34. ltrMsg.Text = "You do not have rights to view.";
  35. return;
  36. }
  37. /* Copy Schedule */
  38. string copySchType = Request.Form["IsCopyDayorWeek"] ?? "";
  39. if (!string.IsNullOrEmpty(copySchType))
  40. {
  41. doCopySchedule(copySchType);
  42. }
  43. string selPlan = Request.Form["planRadio"];
  44. if (string.IsNullOrEmpty(selPlan)) selPlan = "week";
  45. string thtml = "<input type=\"radio\" id=\"radio1\" name=\"planRadio\" onclick=\"submit();\" value=\"day\"" + ((!string.IsNullOrEmpty(selPlan) && selPlan.Equals("day")) ? " checked=\"checked\"" : "") + " /><label for=\"radio1\">Day</label>";
  46. thtml += "<input type=\"radio\" id=\"radio2\" name=\"planRadio\" onclick=\"submit();\" value=\"week\"" + ((string.IsNullOrEmpty(selPlan) || selPlan.Equals("week")) ? " checked=\"checked\"" : "") + "/><label for=\"radio2\">Week</label>";
  47. thtml += "<input type=\"radio\" id=\"radio3\" name=\"planRadio\" onclick=\"submit();\" value=\"month\"" + ((!string.IsNullOrEmpty(selPlan) && selPlan.Equals("month")) ? " checked=\"checked\"" : "") + " /><label for=\"radio3\">Month</label>";
  48. radioHtml.Text = thtml;
  49. string selHrs = Request.Form["rdoHours"];
  50. if (string.IsNullOrEmpty(selHrs)) selHrs = "0";
  51. string timechangeclick = Request.Form["hdTimeChangeClicked"];
  52. if (!string.IsNullOrEmpty(timechangeclick) && timechangeclick.Equals("1"))
  53. {
  54. selHrs = (selHrs.Equals("1"))?"0":"1";
  55. }
  56. ltrTimeHrs.Text = "<input type=\"hidden\" id=\"hdTimeChangeClicked\" name=\"hdTimeChangeClicked\" /><input type=\"radio\" id=\"rdoHrs\" name=\"rdoHours\" onclick=\"timeChangeSubmit();\" value=\"" + selHrs + "\" checked=\"checked\" /><label for=\"rdoHrs\">" + (selHrs.Equals("0")?"00:30":"00:00") + "</label>";
  57. string show6to2Clicked = Request.Form["hdshow6to2"];
  58. string show6to2 = Request.Form["radioshow6to2"]??"";
  59. //if (string.IsNullOrEmpty(show6to2)) show6to2 = "1";
  60. if (!string.IsNullOrEmpty(show6to2Clicked) && show6to2Clicked.Equals("1"))
  61. {
  62. show6to2 = (show6to2.Equals("0")||show6to2.Equals("")) ? "1" : "0";
  63. }
  64. ltrshow6To2.Text = "<input type=\"hidden\" id=\"hdshow6to2\" name=\"hdshow6to2\" /><input type=\"radio\" id=\"rdoshow6to2\" name=\"radioshow6to2\" onclick=\"Show6To9Submit('hdshow6to2');\" value=\"" + show6to2 + "\"" + ((show6to2.Equals("1")) ? " checked=\"checked\"" : "") + " /><label for=\"rdoshow6to2\">6AM-2PM</label>";
  65. string timemodeStr = "BestPlanner.plannerTimeMode = ";
  66. StringBuilder sbTimeSlice = new StringBuilder();
  67. sbTimeSlice.AppendLine("<script type=\"text/javascript\">");
  68. sbTimeSlice.Append("aryTimes = [");
  69. if(selHrs.Equals("0"))
  70. {
  71. if(show6to2.Equals("1"))
  72. {
  73. sbTimeSlice.Append("'630', '730', '830', '930', '1030', '1130', '1230', '1330',");
  74. }
  75. sbTimeSlice.Append("'1430', '1530', '1630', '1730', '1830', '1930', '2030', '2130'");
  76. timemodeStr += "timeModeHours;";
  77. }
  78. else
  79. {
  80. if(show6to2.Equals("1"))
  81. {
  82. sbTimeSlice.Append(" '600', '630', '700', '730', '800', '830', '900', '930', '1000', '1030', '1100', '1130', '1200', '1230', '1300', '1330', '1400' ");
  83. }
  84. if (show6to2.Equals("1"))
  85. sbTimeSlice.Append(",");
  86. else
  87. sbTimeSlice.Append("'1400', ");
  88. sbTimeSlice.Append("'1430', '1500', '1530', '1600', '1630', '1700', '1730', '1800', '1830', '1900', '1930', '2000', '2030', '2100', '2130', '2200'");
  89. timemodeStr += "timeModeHalfHours;";
  90. }
  91. sbTimeSlice.AppendLine("]; </script>");
  92. ltrTimeSlices.Text = sbTimeSlice.ToString();
  93. string plannerdateNav = Request.Form["plannerDateNav"];
  94. string curPlannerDate = Request.Form["curPlannerDate"];
  95. string plannerdate;
  96. DateTime fromDate, toDate;
  97. // Array days = Enum.GetValues(GetType(DayOfWeek));
  98. fromDate = DateTime.Today;
  99. toDate = fromDate;
  100. if (string.IsNullOrEmpty(plannerdateNav))
  101. plannerdateNav = "0";
  102. if (string.IsNullOrEmpty(curPlannerDate))
  103. curPlannerDate = DateTime.Today.ToString("MM/dd/yyyy");
  104. int direction;
  105. int.TryParse(plannerdateNav, out direction);
  106. DateTime today = Convert.ToDateTime(curPlannerDate);
  107. if (selPlan.Equals("day"))
  108. {
  109. today = today.AddDays(direction);
  110. fromDate = today;
  111. toDate = fromDate;
  112. }
  113. else if (string.IsNullOrEmpty(selPlan) || selPlan.Equals("week"))
  114. {
  115. today = today.AddDays(direction * 7);
  116. int curweek = ((int)today.DayOfWeek) * -1;
  117. fromDate = today.AddDays(curweek);
  118. toDate = fromDate.AddDays(7);
  119. }
  120. else if (selPlan.Equals("month"))
  121. {
  122. today = today.AddMonths(direction);
  123. }
  124. plannerdate = today.ToString("MM/dd/yyyy");
  125. StringBuilder sb = new StringBuilder();
  126. sb.AppendLine(plannerData(fromDate, toDate));
  127. /* Auto Student and Tutors */
  128. sb.AppendLine(StudentAndTutors());
  129. /* StudentProgs */
  130. sb.AppendLine(StudentPrograms());
  131. sb.AppendLine("$(document).ready(function(){");
  132. sb.AppendLine("BestPlanner.plannerDate = new Date('" + plannerdate + "');");
  133. if (string.IsNullOrEmpty(selPlan) || selPlan.Equals("day"))
  134. sb.AppendLine("BestPlanner.plannerMode = PlannerDay;");
  135. else if (selPlan.Equals("week"))
  136. sb.AppendLine("BestPlanner.plannerMode = PlannerWeek;");
  137. else if (selPlan.Equals("month"))
  138. sb.AppendLine("BestPlanner.plannerMode = PlannerMonth;");
  139. //sb.AppendLine("BestPlanner.plannerDisplay = " + (plannerDisplay.Equals("oneby") ? "OneonOneDisplay" : "GroupDisplay") + ";");
  140. sb.AppendLine(timemodeStr);
  141. sb.AppendLine("BestPlanner.Show();");
  142. sb.AppendLine("BestPlanner.extendToSchedule();");
  143. sb.AppendLine("setTimeout(\"BestPlanner.DrawSchedules(false);\", 200);");
  144. sb.AppendLine("StudentPrograms.extendToStudProg();");
  145. sb.AppendLine("Programs.extendToProgram();");
  146. sb.AppendLine("});");
  147. sb.AppendLine("</script>");
  148. ltrScript.Text = sb.ToString();
  149. WeekCopyHTML(today);
  150. }
  151. private string plannerData(DateTime fromDate, DateTime toDate)
  152. {
  153. StringBuilder jsSb = new StringBuilder();
  154. jsSb.AppendLine("<script type=\"text/javascript\">");
  155. string scheduleSample = "{schGuid:\"[paramSchGuid]\",stuGuid1:\"[paramStuGuid1]\",stuGuid2:\"[paramStuGuid2]\",stuGuid3:\"[paramStuGuid3]\",stuGuid4:\"[paramStuGuid4]\",stuGuid5:\"[paramStuGuid5]\",tutGuid:\"[paramTutGuid]\",schDate:\"[paramSchDate]\",schFrom:\"[paramSchFrom]\",schTo:\"[paramSchTo]\", isDeleted:\"[paramIsDel]\", Index:\"[paramIndex]\", schId:[paramSchId], attend0:\"[paramAttend0]\", attend1:\"[paramAttend1]\", attend2:\"[paramAttend2]\", attend3:\"[paramAttend3]\", attend4:\"[paramAttend4]\", note0:\"[paramNote0]\", note1:\"[paramNote1]\", note2:\"[paramNote2]\", note3:\"[paramNote3]\", note4:\"[paramNote4]\", progGuid1:\"[paramprogGuid1]\", progGuid2:\"[paramprogGuid2]\", progGuid3:\"[paramprogGuid3]\", progGuid4:\"[paramprogGuid4]\", progGuid5:\"[paramprogGuid5]\"}";
  156. BestSchedules bsch = new BestSchedules();
  157. List<BestField> paramSch = new List<BestField>();
  158. paramSch.Add(new BestField { fieldName = "fromDate", fieldType = "System.String", paramOledbType = System.Data.OleDb.OleDbType.VarChar, fieldValue = fromDate.ToString("yyyyMMdd") });
  159. paramSch.Add(new BestField { fieldName = "toDate", fieldType = "System.String", paramOledbType = System.Data.OleDb.OleDbType.VarChar, fieldValue = toDate.ToString("yyyyMMdd") });
  160. paramSch.Add(Utils.User.CenterIdField);
  161. bsch.LoadRows("schdate>=? and schdate<=? and isdeleted=0 and centerid=?", paramSch, "schdate,schfrom");
  162. /* Schedules into JavaScript */
  163. jsSb.AppendLine("ScheduleInfo = [");
  164. int idx = 0;
  165. string curdate = "";
  166. for (int i = 0; i < bsch.TableRows.Count; i++)
  167. {
  168. bsch.currentRowId = i;
  169. var datetimeSlice = bsch.schDate + bsch.schFrom;
  170. if (!curdate.Equals(datetimeSlice))
  171. {
  172. curdate = datetimeSlice;
  173. idx = 0;
  174. }
  175. else
  176. {
  177. idx++;
  178. }
  179. jsSb.Append(ReplaceSchedule(bsch.TableRows[i], scheduleSample, idx, i));
  180. if (i < bsch.TableRows.Count - 1) jsSb.AppendLine(",");
  181. }
  182. jsSb.AppendLine("];");
  183. return jsSb.ToString();
  184. }
  185. private string StudentAndTutors()
  186. {
  187. StringBuilder jsSb = new StringBuilder();
  188. string autoSample = "{value:\"[paramValue]\", label:[paramLabel]}";
  189. jsSb.AppendLine("autoStudents = [");
  190. BestStudents bstd = new BestStudents();
  191. bstd.LoadRows("CenterId=?", Utils.User.CIdParam, "firstname");
  192. for (int s = 0; s < bstd.TableRows.Count; s++)
  193. {
  194. string result = autoSample;
  195. bstd.currentRowId = s;
  196. result = result.Replace("[paramValue]", bstd.guidfield.ToString());
  197. result = result.Replace("[paramLabel]", Utils.EnquoteJS((bstd.firstName ?? "") + " " +
  198. (bstd.lastName ?? "")));
  199. jsSb.Append(result);
  200. if (s < bstd.TableRows.Count - 1) jsSb.AppendLine(",");
  201. }
  202. jsSb.AppendLine("];");
  203. BestTutors bstut = new BestTutors();
  204. bstut.LoadRows("CenterId=?", Utils.User.CIdParam,"firstname");
  205. jsSb.AppendLine("autoTutors = [");
  206. for (int s = 0; s < bstut.TableRows.Count; s++)
  207. {
  208. string result = autoSample;
  209. bstut.currentRowId = s;
  210. result = result.Replace("[paramValue]", bstut.guidfield.ToString());
  211. result = result.Replace("[paramLabel]", Utils.EnquoteJS((bstut.firstName ?? "") + " " + (bstut.lastName ?? "").Substring(0, 1) + "-" + bstut.TutorId));
  212. jsSb.Append(result);
  213. if (s < bstut.TableRows.Count - 1) jsSb.AppendLine(",");
  214. }
  215. jsSb.AppendLine("];");
  216. string studentSample = "{\"firstName\":[paramFirst], \"lastName\":[paramLast], \"guid\":\"[paramGuid]\"}";
  217. jsSb.AppendLine("StudentInfo = [");
  218. for (int s = 0; s < bstd.TableRows.Count; s++)
  219. {
  220. string result = studentSample;
  221. bstd.currentRowId = s;
  222. result = result.Replace("[paramGuid]", bstd.guidfield.ToString());
  223. result = result.Replace("[paramFirst]", Utils.EnquoteJS(bstd.firstName?? ""));
  224. result = result.Replace("[paramLast]", Utils.EnquoteJS(bstd.lastName?? ""));
  225. jsSb.Append(result);
  226. if (s < bstd.TableRows.Count - 1) jsSb.AppendLine(",");
  227. }
  228. jsSb.AppendLine("];");
  229. string tutorSample = "{\"Name\":[paramName], \"Id\":\"[paramId]\",\"guid\":\"[paramGuid]\"}";
  230. jsSb.AppendLine("TutorInfo = [");
  231. for (int s = 0; s < bstut.TableRows.Count; s++)
  232. {
  233. string result = tutorSample;
  234. bstut.currentRowId = s;
  235. result = result.Replace("[paramGuid]", bstut.guidfield.ToString());
  236. result = result.Replace("[paramName]", Utils.EnquoteJS((bstut.firstName?? "") + " " + (bstut.lastName?? "").Substring(0,1) + "-" + bstut.TutorId));
  237. result = result.Replace("[paramId]", bstut.TutorId);
  238. jsSb.Append(result);
  239. if (s < bstut.TableRows.Count - 1) jsSb.AppendLine(",");
  240. }
  241. jsSb.AppendLine("];");
  242. return jsSb.ToString();
  243. }
  244. private string StudentPrograms()
  245. {
  246. StringBuilder sbprog = new StringBuilder();
  247. BestStudentPrograms bstdProg = new BestStudentPrograms();
  248. bstdProg.LoadRows("CenterId=? and programguid in (select guidfield from bestprograms where amountType not in ('OneTime', 'Year'))", Utils.User.CIdParam, "studentguid");
  249. sbprog.AppendLine("StudentProgs = [");
  250. string firstguid = "";
  251. int sequence = 0;
  252. for (int i = 0; i < bstdProg.TableRows.Count; i++)
  253. {
  254. bstdProg.currentRowId = i;
  255. if (!firstguid.Equals(bstdProg.studentGuid.ToString()))
  256. {
  257. sequence = 0;
  258. firstguid = bstdProg.studentGuid.ToString();
  259. }
  260. sequence++;
  261. sbprog.Append("{guidfield:\"" + bstdProg.guidfield.ToString() + "\",studentguid:\"" + bstdProg.studentGuid.ToString() + "\", progGuid:\"" + bstdProg.programguid.ToString() + "\", Amount:" + bstdProg.Amount.ToString("0.00") + ", Index:" + sequence.ToString() + "}");
  262. if (i < bstdProg.TableRows.Count - 1) sbprog.Append(",");
  263. }
  264. sbprog.AppendLine("]");
  265. sbprog.AppendLine("jsProg=[");
  266. BestPrograms bps = new BestPrograms();
  267. bps.LoadRows();
  268. for (int rnum = 0; rnum < bps.TableRows.Count; rnum++)
  269. {
  270. bps.currentRowId = rnum;
  271. sbprog.Append("{guid:\"" + bps.guidfield.ToString() + "\",amount:\"" + bps.amount + "\",amountType:\"" + bps.amountType + "\",progName:\"" + bps.programName + "\",progType:\"" + bps.programType + "\"}");
  272. if (rnum < bps.TableRows.Count - 1) sbprog.Append(",");
  273. }
  274. sbprog.Append("]");
  275. return sbprog.ToString();
  276. }
  277. private string ReplaceSchedule(BestRow bs, string sample, int idx, int schId)
  278. {
  279. string result = sample;
  280. result = result.Replace("[paramSchGuid]", bs.Fields["guidfield"].fieldValue);
  281. result = result.Replace("[paramStuGuid1]", bs.Fields["stuGuid1"].fieldValue??"");
  282. result = result.Replace("[paramStuGuid2]", bs.Fields["stuGuid2"].fieldValue??"");
  283. result = result.Replace("[paramStuGuid3]", bs.Fields["stuGuid3"].fieldValue??"");
  284. result = result.Replace("[paramStuGuid4]", bs.Fields["stuGuid4"].fieldValue??"");
  285. result = result.Replace("[paramStuGuid5]", bs.Fields["stuGuid5"].fieldValue??"");
  286. result = result.Replace("[paramTutGuid]", bs.Fields["tutGuid"].fieldValue??"");
  287. result = result.Replace("[paramSchDate]", bs.Fields["schDate"].fieldValue ?? "");
  288. result = result.Replace("[paramSchFrom]", bs.Fields["schFrom"].fieldValue ?? "");
  289. result = result.Replace("[paramSchTo]", bs.Fields["schTo"].fieldValue ?? "");
  290. result = result.Replace("[paramIndex]", idx.ToString());
  291. string isdeleted = bs.Fields["isDeleted"].fieldValue??"";
  292. result = result.Replace("[paramIsDel]", isdeleted);
  293. result = result.Replace("[paramSchId]", schId.ToString());
  294. result = result.Replace("[paramAttend0]", bs.Fields["attended1"].fieldValue);
  295. result = result.Replace("[paramAttend1]", bs.Fields["attended2"].fieldValue);
  296. result = result.Replace("[paramAttend2]", bs.Fields["attended3"].fieldValue);
  297. result = result.Replace("[paramAttend3]", bs.Fields["attended4"].fieldValue);
  298. result = result.Replace("[paramAttend4]", bs.Fields["attended5"].fieldValue);
  299. result = result.Replace("[paramNote0]", bs.Fields["note1"].fieldValue ?? "");
  300. result = result.Replace("[paramNote1]", bs.Fields["note2"].fieldValue ?? "");
  301. result = result.Replace("[paramNote2]", bs.Fields["note3"].fieldValue ?? "");
  302. result = result.Replace("[paramNote3]", bs.Fields["note4"].fieldValue ?? "");
  303. result = result.Replace("[paramNote4]", bs.Fields["note5"].fieldValue ?? "");
  304. result = result.Replace("[paramprogGuid1]", bs.Fields["progGuid1"].fieldValue ?? "");
  305. result = result.Replace("[paramprogGuid2]", bs.Fields["progGuid2"].fieldValue ?? "");
  306. result = result.Replace("[paramprogGuid3]", bs.Fields["progGuid3"].fieldValue ?? "");
  307. result = result.Replace("[paramprogGuid4]", bs.Fields["progGuid4"].fieldValue ?? "");
  308. result = result.Replace("[paramprogGuid5]", bs.Fields["progGuid5"].fieldValue ?? "");
  309. return result;
  310. }
  311. private void WeekCopyHTML(DateTime plannerDate)
  312. {
  313. StringBuilder sb = new StringBuilder();
  314. /* 4 Weeks Back dates & 4 weeks forward dates */
  315. DateTime sunday = plannerDate.AddDays(((int)plannerDate.DayOfWeek) * -1);
  316. for (int dayCounter = 0; dayCounter < 4; dayCounter++)
  317. {
  318. sb.Append("<option value=\"" + sunday.ToString("MM/dd/yyyy") + "\" " + (dayCounter==0?"selected":"") + ">" + sunday.ToString("MM/dd/yyyy") + " - " + sunday.AddDays(6).ToString("MM/dd/yyyy") + "</option>");
  319. sunday = sunday.AddDays(-7);
  320. }
  321. this.ltrCopyFromWeek.Text = sb.ToString();
  322. sb.Remove(0, sb.Length);
  323. sunday = plannerDate.AddDays(((int)plannerDate.DayOfWeek) * -1);
  324. for (int dayCounter = 1; dayCounter < 5; dayCounter++)
  325. {
  326. sunday = sunday.AddDays(7);
  327. sb.Append("<option value=\"" + sunday.ToString("MM/dd/yyyy") + "\" " + (dayCounter==1?"selected":"") + ">" + sunday.ToString("MM/dd/yyyy") + " - " + sunday.AddDays(6).ToString("MM/dd/yyyy") + "</option>");
  328. }
  329. this.ltrCopyToWeek.Text = sb.ToString();
  330. }
  331. private void doCopySchedule(string copyType)
  332. {
  333. if (copyType.Equals("Week"))
  334. {
  335. string weekFrom = Request.Form["CopyFromWeekDate"] ?? "";
  336. string weekTo = Request.Form["CopyToWeekDate"] ?? "";
  337. if (!string.IsNullOrEmpty(weekFrom) && !string.IsNullOrEmpty(weekTo))
  338. {
  339. BestDatabase db = new BestDatabase();
  340. OleDbCommand myCmd = db.dbCmd;
  341. myCmd.CommandText = "CopySchedules";
  342. myCmd.CommandType = CommandType.StoredProcedure;
  343. myCmd.Parameters.Add(new OleDbParameter("BeginDate", weekFrom));
  344. myCmd.Parameters.Add(new OleDbParameter("ToDate", weekTo));
  345. myCmd.Parameters.Add(new OleDbParameter("CopyType", copyType));
  346. try
  347. {
  348. myCmd.ExecuteNonQuery();
  349. ltrMsg.Text = Utils.InfoMessage("Schedules Copied From" + weekFrom + " to " + weekTo);
  350. }
  351. catch (Exception ex)
  352. {
  353. ltrMsg.Text = Utils.WarningMessage(ex.Message);
  354. }
  355. }
  356. }
  357. else if(copyType.Equals("Day"))
  358. {
  359. string dayFrom = Request.Form["CopyFromDate"] ?? "";
  360. string dayTo = Request.Form["CopyToDate"] ?? "";
  361. if (!string.IsNullOrEmpty(dayFrom) && !string.IsNullOrEmpty(dayTo))
  362. {
  363. BestDatabase db = new BestDatabase();
  364. OleDbCommand myCmd = db.dbCmd;
  365. myCmd.CommandText = "CopySchedules";
  366. myCmd.CommandType = CommandType.StoredProcedure;
  367. myCmd.Parameters.Add(new OleDbParameter("BeginDate", dayFrom));
  368. myCmd.Parameters.Add(new OleDbParameter("ToDate", dayTo));
  369. myCmd.Parameters.Add(new OleDbParameter("CopyType", copyType));
  370. try
  371. {
  372. myCmd.ExecuteNonQuery();
  373. ltrMsg.Text = Utils.InfoMessage("Schedules Copied From" + dayFrom + " to " + dayTo);
  374. }
  375. catch (Exception ex)
  376. {
  377. ltrMsg.Text = Utils.WarningMessage(ex.Message);
  378. }
  379. }
  380. }
  381. }
  382. }
  383. }