private void actResv(UNIRESERVE info, ref uniresv resv) { uint?tchl = info.dwTeachingTime; resv.ltch = (int)tchl; int start = (int)(tchl % 10000) / 100; int end = (int)tchl % 100; string[] week = { "一", "二", "三", "四", "五", "六", "日" }; resv.name = (int)tchl / 100000 + "周【" + "星期" + week[(int)((tchl / 10000) % 10)] + "】第" + start + (start == end ? "" : ("-" + end)) + "节"; //预约状态 if ((info.dwStatus & (uint)UNIRESERVE.DWSTATUS.RESVSTAT_UNDO) > 0) { resv.state = "undo"; } else if ((info.dwStatus & (uint)UNIRESERVE.DWSTATUS.RESVSTAT_DOING) > 0) { resv.state = "doing"; } else if ((info.dwStatus & (uint)UNIRESERVE.DWSTATUS.RESVSTAT_DONE) > 0) { resv.state = "done"; } else { resv.state = "othe"; } resv.allDay = false; resv.islong = false; }
private void ConvertTestResvInfo(UNITESTITEM test, ref List <uniresv> list) { UNIRESERVE[] resvs = test.ResvInfo; for (int j = 0; j < resvs.Length; j++) { uniresv resv = new uniresv(); UNIRESERVE info = resvs[j]; RESVDEV[] rsvdev = info.ResvDev; string rooms = GetRoomsFromResvDev(rsvdev); resv.id = info.dwResvID.ToString(); resv.title = test.szGroupName + ";" + rooms; // resv.detail = "房间:" + rooms + "<br/>班级:" + test.szGroupName + "<br/>实验:" + test.szTestName + "<br/>课程:" + test.szCourseName; resv.detail = info.dwResvID.ToString(); resv.testId = test.dwTestItemID.ToString(); resv.testName = test.szTestName; resv.owner = test.szTeacherName; resv.ownerAccno = test.dwTeacherID.ToString(); resv.groupId = test.dwGroupID.ToString(); // resv.groupName = test.szGroupName; resv.groupName = info.dwResvID.ToString(); resv.planId = test.dwTestPlanID.ToString(); resv.planName = test.szTestPlanName; actResv(info, ref resv); list.Add(resv); } }