private string getCourseInfo() { StringBuilder sb = new StringBuilder(); sb.Append(SectionDetails1.SaveCourseDetails(SectionsID)); //list pre-existing meetings ClsTempExistingMeeting preexistingMeeting = new ClsTempExistingMeeting("MasterSchedule"); DataSet preexistingMeetingds = new DataSet(); preexistingMeeting.SectionId = section.SectionId; preexistingMeetingds = preexistingMeeting.FillDsPre(); sb.Append("Original Meeting Times:<br/>"); if (preexistingMeetingds.Tables[0].Rows.Count != 0) { for (int i = 0; i < preexistingMeetingds.Tables[0].Rows.Count; i++) { sb.Append(" Meeting: " + ((int)(i + 1)).ToString()); sb.Append("<br/> Campus: " + preexistingMeetingds.Tables[0].Rows[i]["Campus"].ToString()); sb.Append("<br/>   Room: " + preexistingMeetingds.Tables[0].Rows[i]["Room"].ToString()); sb.Append("<br/> Start Time: " + FormatTime(preexistingMeetingds.Tables[0].Rows[i]["StartTime"].ToString())); sb.Append("<br/> End Time: " + FormatTime(preexistingMeetingds.Tables[0].Rows[i]["EndTime"].ToString())); sb.Append("<br/> Days: " + preexistingMeetingds.Tables[0].Rows[i]["Days"].ToString()); sb.Append("<br/><br/>"); } } preexistingMeetingds.Dispose(); if (cbDropCourse.Checked) { sb.Append("Cancel Section<br>"); sb.Append("<br /><b>Please cancel the selected course section.</b><br /><br />"); // sb.Append(string.Format("<br /><b>Cancel Reason: </b>{0}<br /><br />", (ddlDropReason.SelectedValue == "Other Category" ? ddlDropReason.SelectedValue + " - " + txtOtherReason.Text : ddlDropReason.SelectedValue) )); } else { ClsTempFaculty faculty = new ClsTempFaculty("MasterSchedule"); faculty.SectionId = Faculty1.sectionGUID; DataSet facultyds = faculty.FillDs(); ClsTempExistingFaculty existingFaculty = new ClsTempExistingFaculty("MasterSchedule"); existingFaculty.QsSectionsId = SectionsID; DataSet exitingFacultyds = existingFaculty.FillDs(); if (facultyds.Tables[0].Rows.Count > 0 || exitingFacultyds.Tables[0].Rows.Count > 0) { sb.Append("Faculty<ul><b>"); } for (int i = 0; i < facultyds.Tables[0].Rows.Count; i++) { sb.Append("<li>Add Faculty: " + facultyds.Tables[0].Rows[i]["FacultyName"].ToString() + "</li>"); } facultyds.Dispose(); if (exitingFacultyds.Tables[0].Rows.Count > 0) { sb.Append("<hr />"); for (int i = 0; i < exitingFacultyds.Tables[0].Rows.Count; i++) { sb.Append("<li>Delete Faculty: " + exitingFacultyds.Tables[0].Rows[i]["FacultyName"].ToString() + "</li>"); } } exitingFacultyds.Dispose(); sb.Append("</b></ul><br/>"); ClsTempMeeting meeting = new ClsTempMeeting("MasterSchedule"); meeting.SectionId = section.SectionId; DataSet meetingds = meeting.FillDs(); ClsTempExistingMeeting existingMeeting = new ClsTempExistingMeeting("MasterSchedule"); DataSet existingMeetingds = new DataSet(); existingMeeting.SectionId = section.SectionId; existingMeetingds = existingMeeting.FillDs(); if (meetingds.Tables[0].Rows.Count > 0 || existingMeetingds.Tables[0].Rows.Count > 0) { sb.Append("Meetings<br/><br/>"); } if (meetingds.Tables[0].Rows.Count != 0) { for (int i = 0; i < meetingds.Tables[0].Rows.Count; i++) { sb.Append("<b>Add Meeting: " + ((int)(i + 1)).ToString()); sb.Append("<br/>Campus: " + meetingds.Tables[0].Rows[i]["Campus"].ToString()); sb.Append("<br/>Room: " + meetingds.Tables[0].Rows[i]["Room"].ToString()); sb.Append("<br/>Start Time: " + meetingds.Tables[0].Rows[i]["StartTime"].ToString()); sb.Append("<br/>End Time: " + meetingds.Tables[0].Rows[i]["EndTime"].ToString()); sb.Append("<br/>Days: " + meetingds.Tables[0].Rows[i]["Days"].ToString()); sb.Append("<br/>Type: " + meetingds.Tables[0].Rows[i]["Type"].ToString()); sb.Append("</b><br/><br/>"); } } meetingds.Dispose(); if (existingMeetingds.Tables[0].Rows.Count != 0) { sb.Append("<b>-----------------------------------------------------</b><br/>"); for (int i = 0; i < existingMeetingds.Tables[0].Rows.Count; i++) { sb.Append("<b>Drop Meeting: " + ((int)(i + 1)).ToString()); sb.Append("<br/>Campus: " + existingMeetingds.Tables[0].Rows[i]["Campus"].ToString()); sb.Append("<br/>Room: " + existingMeetingds.Tables[0].Rows[i]["Room"].ToString()); sb.Append("<br/>Start Time: " + FormatTime(existingMeetingds.Tables[0].Rows[i]["StartTime"].ToString())); sb.Append("<br/>End Time: " + FormatTime(existingMeetingds.Tables[0].Rows[i]["EndTime"].ToString())); sb.Append("<br/>Days: " + existingMeetingds.Tables[0].Rows[i]["Days"].ToString()); sb.Append("</b><br/><br/>"); } } existingMeetingds.Dispose(); //if (rbliTunesu.SelectedIndex == 0 || rbliTunesu.SelectedIndex == 1) { // sb.Append("iTunes U<ul><b>"); // sb.Append("<li>" + rbliTunesu.SelectedValue.ToString() + "</li>"); // sb.Append("</b></ul><br/>"); //} if (chkIsInMyLabs.Checked) { sb.Append("MyLabsPlus<ul><b>"); sb.Append("<li> This course is in Pearson eCollege MyLabsPlus.</li>"); sb.Append("</b></ul><br/>"); } if (radDirectContentFee.SelectedIndex < 2) { sb.Append("Direct Content Fee<ul><b>"); sb.Append(string.Concat("<li>", radDirectContentFee.SelectedValue, "</li>")); sb.Append("</b></ul><br />"); } ClsTempColink colink = new ClsTempColink("MasterSchedule"); colink.SectionId = section.SectionId; DataSet colinkds = colink.FillDs(); if (colinkds.Tables[0].Rows.Count > 0) { sb.Append("Co-Listed Courses<ul><b>"); for (int i = 0; i < colinkds.Tables[0].Rows.Count; i++) { sb.Append("<li>" + colinkds.Tables[0].Rows[i]["Action"].ToString() + " : " + colinkds.Tables[0].Rows[i]["Department"].ToString() + " - " + colinkds.Tables[0].Rows[i]["Course"].ToString() + " - " + colinkds.Tables[0].Rows[i]["Section"].ToString() + "</li>"); } sb.Append("</b></ul><br/>"); } colinkds.Dispose(); //clsTempLink link = new clsTempLink("MasterSchedule"); //link.SectionID = section.SectionID; //DataSet linkds = link.FillDs(); //if (linkds.Tables[0].Rows.Count > 0) //{ // sb.Append("Cross Linked Courses<ul><b>"); // for (int i = 0; i < linkds.Tables[0].Rows.Count; i++) // sb.Append("<li>" + linkds.Tables[0].Rows[i]["Action"].ToString() + " : " + linkds.Tables[0].Rows[i]["Department"].ToString() + " - " + linkds.Tables[0].Rows[i]["Course"].ToString() + " - " + linkds.Tables[0].Rows[i]["Section"].ToString() + "</li>"); // sb.Append("</b></ul><br/>"); //} //linkds.Dispose(); ClsTempCoreq coreq = new ClsTempCoreq("MasterSchedule"); coreq.SectionId = section.SectionId; DataSet coreqds = coreq.FillDs(); if (coreqds.Tables[0].Rows.Count > 0) { sb.Append("Co-requisite/Linked Courses<ul><b>"); for (int i = 0; i < coreqds.Tables[0].Rows.Count; i++) { sb.Append("<li>" + coreqds.Tables[0].Rows[i]["Action"].ToString() + " : " + coreqds.Tables[0].Rows[i]["Department"].ToString() + " - " + coreqds.Tables[0].Rows[i]["Course"].ToString() + " - " + coreqds.Tables[0].Rows[i]["Section"].ToString() + "</li>"); } sb.Append("</b></ul><br/>"); } coreqds.Dispose(); } sb.Append("Comments<ul>"); string InitiatorComments = string.Empty; if (string.IsNullOrEmpty(Comments_New1.Comments)) { InitiatorComments = "No Comments."; } else { InitiatorComments = Comments_New1.Comments; } sb.Append("<br/>Initiator: " + InitiatorComments); sb.Append("</ul><br/>"); return(sb.ToString()); }
private string getCourseInfo() { int totalDays = DateTime.Parse(SectionDetails1.DateEnd).Subtract(DateTime.Parse(SectionDetails1.DateStart)).Days + 1; string beforeDay = ""; string afterDay = ""; StringBuilder sb = new StringBuilder(); sb.Append("Course Details<br/>"); sb.Append("Year: " + SectionDetails1.Year); sb.Append("<br/>Semester: " + SectionDetails1.Semester); sb.Append("<br/>Department: " + SectionDetails1.Department); sb.Append("<br/>Catalog Number: " + SectionDetails1.CatalogNumber); sb.Append("<br/>Section Number: " + SectionDetails1.SectionNumber); sb.Append("<br/>Start Date: " + SectionDetails1.DateStart); sb.Append("<br/>End Date: " + SectionDetails1.DateEnd); sb.Append("<br/>Capacity: " + SectionDetails1.Capacity); sb.Append("<br/>Refund Policy: " + RefundPeriodLookup(DateTime.Parse(SectionDetails1.DateStart), DateTime.Parse(SectionDetails1.DateEnd))); sb.Append("<br/>Refund Policy is not applicable to non-credit courses."); sb.Append("<br/>Days: " + totalDays.ToString()); sb.Append("<br/><br/>"); ClsTempFaculty faculty = new ClsTempFaculty("MasterSchedule"); faculty.SectionId = section.SectionId; DataSet facultyds = faculty.FillDs(); if (facultyds.Tables[0].Rows.Count > 0) { sb.Append("Faculty<ul>"); for (int i = 0; i < facultyds.Tables[0].Rows.Count; i++) { sb.Append("<li>" + facultyds.Tables[0].Rows[i]["FacultyName"].ToString() + "</li>"); } sb.Append("</ul><br/>"); } facultyds.Dispose(); ClsTempMeeting meeting = new ClsTempMeeting("MasterSchedule"); meeting.SectionId = section.SectionId; DataSet meetingds = meeting.FillDs(); if (meetingds.Tables[0].Rows.Count > 0) { sb.Append("Meetings<br/><br/>"); for (int i = 0; i < meetingds.Tables[0].Rows.Count; i++) { sb.Append("Meeting " + ((int)(i + 1)).ToString()); sb.Append("<br/>Location: " + meetingds.Tables[0].Rows[i]["Campus"].ToString()); sb.Append("<br/>Room: " + meetingds.Tables[0].Rows[i]["Room"].ToString()); sb.Append("<br/>Start Time: " + meetingds.Tables[0].Rows[i]["StartTime"].ToString()); sb.Append("<br/>End Time: " + meetingds.Tables[0].Rows[i]["EndTime"].ToString()); sb.Append("<br/>Days: " + meetingds.Tables[0].Rows[i]["Days"].ToString()); sb.Append("<br/>Type: " + meetingds.Tables[0].Rows[i]["Type"].ToString()); sb.Append("<br/><br/>"); } } meetingds.Dispose(); //if (rbliTunesu.SelectedIndex == 0) //{ // sb.Append("iTunes U<ul><b>"); // sb.Append("<li>" + rbliTunesu.SelectedValue.ToString() + "</li>"); // sb.Append("</b></ul><br/>"); //} if (chkIsInMyLabs.Checked) { sb.Append("MyLabsPlus<ul><b>"); sb.Append("<li> This course is in Pearson eCollege MyLabsPlus.</li>"); sb.Append("</b></ul><br/>"); } if (ckDirectContentFee.Checked) { sb.Append("Direct Content Fee<ul><b>"); sb.Append("<li>Course has a direct content fee.</li>"); sb.Append("</b></ul><br />"); } ClsTempColink colink = new ClsTempColink("MasterSchedule"); colink.SectionId = section.SectionId; DataSet colinkds = colink.FillDs(); if (colinkds.Tables[0].Rows.Count > 0) { sb.Append("Co-Listed Courses<ul>"); for (int i = 0; i < colinkds.Tables[0].Rows.Count; i++) { sb.Append("<li>" + colinkds.Tables[0].Rows[i]["Department"].ToString() + " - " + colinkds.Tables[0].Rows[i]["Course"].ToString() + " - " + colinkds.Tables[0].Rows[i]["Section"].ToString() + "</li>"); } sb.Append("</ul><br/>"); } colinkds.Dispose(); //clsTempLink link = new clsTempLink("MasterSchedule"); //link.SectionID = section.SectionID; //DataSet linkds = link.FillDs(); //if (linkds.Tables[0].Rows.Count > 0) //{ // sb.Append("Cross Linked Courses<ul>"); // for (int i = 0; i < linkds.Tables[0].Rows.Count; i++) // sb.Append("<li>" + linkds.Tables[0].Rows[i]["Department"].ToString() + " - " + linkds.Tables[0].Rows[i]["Course"].ToString() + " - " + linkds.Tables[0].Rows[i]["Section"].ToString() + "</li>"); // sb.Append("</ul><br/>"); //} //linkds.Dispose(); ClsTempCoreq coreq = new ClsTempCoreq("MasterSchedule"); coreq.SectionId = section.SectionId; DataSet coreqds = coreq.FillDs(); if (coreqds.Tables[0].Rows.Count > 0) { sb.Append("Co-requisite/Linked Courses<ul>"); for (int i = 0; i < coreqds.Tables[0].Rows.Count; i++) { sb.Append("<li>" + coreqds.Tables[0].Rows[i]["Department"].ToString() + " - " + coreqds.Tables[0].Rows[i]["Course"].ToString() + " - " + coreqds.Tables[0].Rows[i]["Section"].ToString() + "</li>"); } sb.Append("</ul><br/>"); } coreqds.Dispose(); sb.Append("Comments<ul>"); string InitiatorComments = string.Empty; if (string.IsNullOrEmpty(Comments_New1.Comments)) { InitiatorComments = "No Comments."; } else { InitiatorComments = Comments_New1.Comments; } sb.Append("<br/>Initiator: " + InitiatorComments); sb.Append("</ul><br/>"); return(sb.ToString()); }
private string getCourseInfo() { StringBuilder sb = new StringBuilder(); sb.Append("Course Details<br/>"); sb.Append("Year: " + SectionDetails1.Year); sb.Append("<br/>Semester: " + SectionDetails1.Semester); sb.Append("<br/>Department: " + SectionDetails1.Department); sb.Append("<br/>Catalog Number: " + SectionDetails1.CatalogNumber); sb.Append("<br/>Section Number: " + SectionDetails1.SectionNumber); sb.Append("<br/>Start Date: " + SectionDetails1.DateStart); sb.Append("<br/>End Date: " + SectionDetails1.DateEnd); sb.Append("<br/>Capacity: " + SectionDetails1.Capacity); sb.Append("<br/><br/>"); sb.Append("Faculty<ul>"); ClsTempFaculty faculty = new ClsTempFaculty("MasterSchedule"); faculty.SectionId = section.SectionId; DataSet facultyds = faculty.FillDs(); for (int i = 0; i < facultyds.Tables[0].Rows.Count; i++) { sb.Append("<li>" + facultyds.Tables[0].Rows[i]["FacultyName"].ToString() + "</li>"); } facultyds.Dispose(); sb.Append("</ul><br/>"); sb.Append("Meetings<br/><br/>"); ClsTempMeeting meeting = new ClsTempMeeting("MasterSchedule"); meeting.SectionId = section.SectionId; DataSet meetingds = meeting.FillDs(); for (int i = 0; i < meetingds.Tables[0].Rows.Count; i++) { sb.Append("Meeting " + ((int)(i + 1)).ToString()); sb.Append("<br/>Campus: " + meetingds.Tables[0].Rows[i]["Campus"].ToString()); sb.Append("<br/>Room: " + meetingds.Tables[0].Rows[i]["Room"].ToString()); sb.Append("<br/>Start Time: " + meetingds.Tables[0].Rows[i]["StartTime"].ToString()); sb.Append("<br/>End Time: " + meetingds.Tables[0].Rows[i]["EndTime"].ToString()); sb.Append("<br/>Days: " + meetingds.Tables[0].Rows[i]["Days"].ToString()); sb.Append("<br/>Type: " + meetingds.Tables[0].Rows[i]["Type"].ToString()); sb.Append("<br/><br/>"); } meetingds.Dispose(); sb.Append("Co-Listed Courses<ul>"); ClsTempColink colink = new ClsTempColink("MasterSchedule"); colink.SectionId = section.SectionId; DataSet colinkds = colink.FillDs(); for (int i = 0; i < colinkds.Tables[0].Rows.Count; i++) { sb.Append("<li>" + colinkds.Tables[0].Rows[i]["Department"].ToString() + " - " + colinkds.Tables[0].Rows[i]["Course"].ToString() + " - " + colinkds.Tables[0].Rows[i]["Section"].ToString() + "</li>"); } colinkds.Dispose(); sb.Append("</ul><br/>"); sb.Append("Cross Linked Courses<ul>"); ClsTempLink link = new ClsTempLink("MasterSchedule"); link.SectionId = section.SectionId; DataSet linkds = link.FillDs(); for (int i = 0; i < linkds.Tables[0].Rows.Count; i++) { sb.Append("<li>" + linkds.Tables[0].Rows[i]["Department"].ToString() + " - " + linkds.Tables[0].Rows[i]["Course"].ToString() + " - " + linkds.Tables[0].Rows[i]["Section"].ToString() + "</li>"); } linkds.Dispose(); sb.Append("</ul><br/>"); sb.Append("Co-requisite Courses<ul>"); ClsTempCoreq coreq = new ClsTempCoreq("MasterSchedule"); coreq.SectionId = section.SectionId; DataSet coreqds = coreq.FillDs(); for (int i = 0; i < coreqds.Tables[0].Rows.Count; i++) { sb.Append("<li>" + coreqds.Tables[0].Rows[i]["Department"].ToString() + " - " + coreqds.Tables[0].Rows[i]["Course"].ToString() + " - " + coreqds.Tables[0].Rows[i]["Section"].ToString() + "</li>"); } coreqds.Dispose(); sb.Append("</ul><br/>"); sb.Append("Comments<ul>"); string InitiatorComments = string.Empty; if (string.IsNullOrEmpty(Comments_New1.Comments)) { InitiatorComments = "No Comments."; } else { InitiatorComments = Comments_New1.Comments; } sb.Append("<br/>Initiator: " + InitiatorComments); sb.Append("</ul><br/>"); return(sb.ToString()); }
protected void btnAddNewCourse_Click(object sender, EventArgs e) { StringBuilder sb = new StringBuilder(); sb.Append("<h4>Add Course:</h4><br/><br/>"); sb.Append("Course Details<br/>"); sb.Append("Year: " + SectionDetails1.Year); sb.Append("<br/>Semester: " + SectionDetails1.Semester); sb.Append("<br/>Department: " + SectionDetails1.Department); sb.Append("<br/>Catalog Number: " + SectionDetails1.CatalogNumber); sb.Append("<br/>Section Number: " + SectionDetails1.SectionNumber); sb.Append("<br/>Start Date: " + SectionDetails1.DateStart); sb.Append("<br/>End Date: " + SectionDetails1.DateEnd); sb.Append("<br/>Capacity: " + SectionDetails1.Capacity); sb.Append("<br/><br/>"); sb.Append("Faculty<ul>"); ClsTempFaculty faculty = new ClsTempFaculty("MasterSchedule"); faculty.SectionId = section.SectionId; DataSet facultyds = faculty.FillDs(); for (int i = 0; i < facultyds.Tables[0].Rows.Count; i++) { sb.Append("<li>" + facultyds.Tables[0].Rows[i]["FacultyName"].ToString() + "</li>"); } facultyds.Dispose(); sb.Append("</ul><br/>"); sb.Append("Meetings<br/><br/>"); ClsTempMeeting meeting = new ClsTempMeeting("MasterSchedule"); meeting.SectionId = section.SectionId; DataSet meetingds = meeting.FillDs(); for (int i = 0; i < meetingds.Tables[0].Rows.Count; i++) { sb.Append("Meeting " + ((int)(i + 1)).ToString()); sb.Append("<br/>Campus: " + meetingds.Tables[0].Rows[i]["Campus"].ToString()); sb.Append("<br/>Room: " + meetingds.Tables[0].Rows[i]["Room"].ToString()); sb.Append("<br/>Start Time: " + meetingds.Tables[0].Rows[i]["StartTime"].ToString()); sb.Append("<br/>End Time: " + meetingds.Tables[0].Rows[i]["EndTime"].ToString()); sb.Append("<br/>Days: " + meetingds.Tables[0].Rows[i]["Days"].ToString()); sb.Append("<br/><br/>"); } meetingds.Dispose(); sb.Append("Cross Linked Courses<ul>"); ClsTempLink link = new ClsTempLink("MasterSchedule"); link.SectionId = section.SectionId; DataSet linkds = link.FillDs(); for (int i = 0; i < linkds.Tables[0].Rows.Count; i++) { sb.Append("<li>" + linkds.Tables[0].Rows[i]["Department"].ToString() + " - " + linkds.Tables[0].Rows[i]["Course"].ToString() + " - " + linkds.Tables[0].Rows[i]["Section"].ToString() + "</li>"); } linkds.Dispose(); sb.Append("</ul><br/>"); sb.Append("Co-requisite Courses<ul>"); ClsTempCoreq coreq = new ClsTempCoreq("MasterSchedule"); coreq.SectionId = section.SectionId; DataSet coreqds = coreq.FillDs(); for (int i = 0; i < coreqds.Tables[0].Rows.Count; i++) { sb.Append("<li>" + coreqds.Tables[0].Rows[i]["Department"].ToString() + " - " + coreqds.Tables[0].Rows[i]["Course"].ToString() + " - " + coreqds.Tables[0].Rows[i]["Section"].ToString() + "</li>"); } coreqds.Dispose(); sb.Append("</ul><br/>"); log.SectionsId = 0; log.SubmittedBy = Session["deltaid"].ToString(); log.DepartmentsId = SectionDetails1.DepartmentsID; log.Change = sb.ToString(); log.AddRecord(); section.DeleteRecord(); MultiView1.ActiveViewIndex = 1; List <ClsChangeLog> logs = new List <ClsChangeLog>(); logs.Add(log); gvPendingChanges.DataSource = logs; gvPendingChanges.DataBind(); }