Пример #1
0
    protected void gvFacultyAssignment_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        if (e.CommandName.ToString() == "deletefaculty")
        {
            log.SectionsId  = int.Parse(Request["SectionsID"]);
            log.SubmittedBy = Session["deltaid"].ToString();
            log.Change      = "Drop Faculty: " + e.CommandArgument.ToString();
            log.AddRecord();

            Helpers.RefreshSortPending((GridView)Helpers.FindControlRecursive(Page.Master, "gvPendingChanges")); //Refresh the pending list
        }
    }
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            log.SectionsId  = int.Parse(Request["SectionsID"]);
            log.SubmittedBy = Session["deltaid"].ToString();
            log.Change      = ddAction.SelectedValue + " Cross Linked Course: " + txtDepartment.Text + " - " + txtCourseNumber.Text + " - " + txtSectionNumber.Text;
            log.AddRecord();

            txtCourseNumber.Text  = "";
            txtDepartment.Text    = "";
            txtSectionNumber.Text = "";

            Helpers.RefreshSortPending((GridView)Helpers.FindControlRecursive(Page.Master, "gvPendingChanges")); //Refresh the pending list
        }
    protected void btnAddNewCourse_Click(object sender, EventArgs e)
    {
        string courseInfo = getCourseInfo();

        try
        {
            log.SectionsId = Int32.Parse(Request.QueryString["SectionsID"]);
        }
        catch
        {
            log.SectionsId = 0;
        }
        log.SubmittedBy   = Session["deltaid"].ToString();
        log.DepartmentsId = SectionDetails1.GetDepartmentsID();
        log.Change        = getCourseInfo();
        log.AddRecord();

        // section.DeleteRecord();
        // this.mvSubmissionForm.ActiveViewIndex = 1;
        List <ClsChangeLog> logs = new List <ClsChangeLog>();

        logs.Add(log);
        gvPendingChanges.DataSource = logs;
        gvPendingChanges.DataBind();

        using (MasterScheduleDataContext db = new MasterScheduleDataContext())
        {
            foreach (string sLocation in hidRooms.Value.TrimEnd(",".ToCharArray()).Split(",".ToCharArray()).ToList().Distinct())
            {
                SendMessageOnLogApproval thisItem = new SendMessageOnLogApproval();

                thisItem.LogID       = log.LogId;
                thisItem.CampusID    = sLocation;
                thisItem.DateCreated = DateTime.Now;
                db.SendMessageOnLogApprovals.InsertOnSubmit(thisItem);
            }

            db.SubmitChanges();
        }

        DivChairEmail = Helpers.GetDivisionEmailByDepartmentsId(log.DepartmentsId, Session["deltaid"].ToString());
        /* Send email upon submission */
        sendNotification(Session["deltaid"].ToString());

        Response.Redirect("~/RequestSubmitted.aspx");
    }
Пример #4
0
    protected void btnAddNewCourse_Click(object sender, EventArgs e)
    {
        string courseInfo = getCourseInfo();

        log.SectionsId    = 0;
        log.SubmittedBy   = Session["deltaid"].ToString();
        log.DepartmentsId = SectionDetails1.DepartmentsID;
        log.Change        = getCourseInfo();
        log.AddRecord();

        section.DeleteRecord();
        this.mvSubmissionForm.ActiveViewIndex = 1;
        List <ClsChangeLog> logs = new List <ClsChangeLog>();

        logs.Add(log);
        gvPendingChanges.DataSource = logs;
        gvPendingChanges.DataBind();

        /* Send email upon submission */
        sendNotification();
    }
Пример #5
0
    protected void btnAddNewCourse_Click()
    {
        string courseInfo = getCourseInfo();

        log.SectionsId    = 0;
        log.SubmittedBy   = Session["deltaid"].ToString();
        log.DepartmentsId = SectionDetails1.DepartmentsID;
        log.Change        = getCourseInfo();
        log.AddRecord();

        section.DeleteRecord();
        MultiView1.ActiveViewIndex = 1;
        List <ClsChangeLog> logs = new List <ClsChangeLog>();

        logs.Add(log);
        gvPendingChanges.DataSource = logs;
        gvPendingChanges.DataBind();

        DivChairEmail = Helpers.GetDivisionEmailByDepartmentsId(log.DepartmentsId);
        /* Send email upon submission */
        sendNotification();
    }
Пример #6
0
        protected void btnDeleteCourse_Click(object sender, EventArgs e)
        {
            ClsSections section = new ClsSections("MasterSchedule");

            section.SectionsId = int.Parse(Request["SectionsID"]);
            section.GetRecord();

            ClsTerms term = new ClsTerms("MasterSchedule");

            term.TermsId = section.TermsId;
            term.GetRecord();

            ClsCourses course = new ClsCourses("MasterSchedule");

            course.CoursesId = section.CoursesId;
            course.GetRecord();

            log.SectionsId  = int.Parse(Request["SectionsID"]);
            log.SubmittedBy = Session["deltaid"].ToString();
            log.Change      = "Drop Course: " + term.Term + " " + course.CourseNumber + " sec " + section.SectionNumber;
            log.AddRecord();

            Helpers.RefreshSortPending((GridView)Helpers.FindControlRecursive(Page.Master, "gvPendingChanges")); //Refresh the pending list
        }
Пример #7
0
        protected void btnUpdateMeeting_Click(object sender, EventArgs e)
        {
            DateTime selectdDate = new DateTime();

            selectdDate = DateTime.Parse(txtEditTermStartDate.Text);
            int semStartDate;

            semStartDate = (int)selectdDate.DayOfWeek;

            updateDateError.Visible = false;
            ClsRooms room = new ClsRooms("MasterSchedule");
            //if (semStartDate != cblDays.SelectedIndex && room.CheckIsBrickAndMortar(ddRoom.SelectedItem.Text))
            //{
            //    updateDateError.Visible = true;
            //}
            //else
            //{
            StringBuilder sb = new StringBuilder();

            sb.Append("<table cellpadding=\"0\" cellspacing=\"0\"><tr>");
            sb.Append("<td colspan=\"2\"><h4>Change Meeting:</h4></td></tr><tr>");
            sb.Append("<td style=\"padding-left:10px;\">From:</td>");
            sb.Append("<td style=\"padding-left:10px;\">To:</td></tr><tr>");
            sb.Append("<td style=\"padding-left:10px;\">");

            ClsSectionMeetings sm = new ClsSectionMeetings("MasterSchedule");

            sm.SectionMeetingsId = int.Parse(UpdateMeetingID.Value);
            sm.GetRecord();
            ClsSections section = new ClsSections("MasterSchedule");

            section.SectionsId = SectionID;
            section.GetRecord();

            room.RoomsId = sm.RoomsId;
            room.GetRecord();
            ClsCampuses campus = new ClsCampuses("MasterSchedule");

            campus.CampusesId = room.CampusesId;
            campus.GetRecord();

            sb.Append("<table cellpadding=\"0\" cellspacing=\"0\">");
            sb.Append("<tr><td style=\"padding-right:5px;\">Campus:</td><td " + MarkOrig(campus.CampusCode, ddCampus.SelectedItem.Text) + "</td></tr>");
            sb.Append("<tr><td style=\"padding-right:5px;\">Room:</td><td " + MarkOrig(room.RoomNumber, ddRoom.SelectedItem.Text) + "</td></tr>");
            sb.Append("<tr><td style=\"padding-right:5px;\">Days:</td><td>" + sm.MeetDays.Replace(":", "") + "</td></tr>");
            sb.Append("<tr><td style=\"padding-right:5px;\">Start Time:</td><td>");

            if (sm.MeetStartTime != DateTime.MinValue)
            {
                sb.Append(sm.MeetStartTime.ToShortTimeString());
            }
            sb.Append("</td></tr>");
            sb.Append("<tr><td style=\"padding-right:5px;\">End Time:</td><td>");
            if (sm.MeetEndTime != DateTime.MinValue)
            {
                sb.Append(sm.MeetEndTime.ToShortTimeString());
            }
            sb.Append("</td></tr>");

            sb.Append("<tr><td>Section Start:</td><td " + MarkOrig_DateType(section.SectionStartDate, txtEditTermStartDate.Text) + "</td></tr>");
            sb.Append("<tr><td>Section End:</td><td " + MarkOrig_DateType(section.SectionEndDate, txtEditTermEndDate.Text) + "</td></tr>");
            sb.Append("</table>");

            sb.Append("</td>");
            sb.Append("<td style=\"padding-left:10px;\">");

            sb.Append("<table cellpadding=\"0\" cellspacing=\"0\">");
            sb.Append("<tr><td style=\"padding-right:5px;\">Campus:</td><td " + MarkChanges(campus.CampusCode, ddCampus.SelectedItem.Text) + "</td></tr>");
            sb.Append("<tr><td style=\"padding-right:5px;\">Room:</td><td " + MarkChanges(room.RoomNumber, ddRoom.SelectedItem.Text) + "</td></tr>");

            sb.Append("<tr><td style=\"padding-right:5px;\">Days:</td><td>");
            foreach (ListItem item in cblDays.Items)
            {
                if (item.Selected)
                {
                    if (_meetChanged)
                    {
                        sb.Append("<strong>");
                    }
                    sb.Append(item.Value); if (_meetChanged)
                    {
                        sb.Append("</strong>");
                    }
                }
            }

            sb.Append("</td></tr>");

            sb.Append("<tr><td style=\"padding-right:5px;\">Start Time:</td><td " + MarkChanges_TimeType(sm.MeetStartTime, txtStartTime.Text) + "</td></tr>");
            sb.Append("<tr><td style=\"padding-right:5px;\">End Time:</td><td " + MarkChanges_TimeType(sm.MeetEndTime, txtEndTime.Text) + "</td></tr>");

            sb.Append("<tr><td>Start Date:</td><td " + MarkChanges_DateType(section.SectionStartDate, txtEditTermStartDate.Text) + "</td></tr>");
            sb.Append("<tr><td>End Date:</td><td " + MarkChanges_DateType(section.SectionEndDate, txtEditTermEndDate.Text) + "</td></tr>");
            sb.Append("</table>");

            sb.Append("</td></tr></table>");

            log.SectionsId   = int.Parse(Request["SectionsID"]);
            log.SubmittedBy  = Session["deltaid"].ToString();
            log.Change       = sb.ToString();
            log.ProcessGroup = "divsionchairs";
            log.AddRecord();

            Helpers.RefreshSortPending((GridView)Helpers.FindControlRecursive(Page.Master, "gvPendingChanges")); //Refresh the pending list

            MultiView1.ActiveViewIndex = 0;
            UpdateMeetingID.Value      = "";
            //}
        }
Пример #8
0
    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();
    }