protected void bAddCourse_Click(object sender, EventArgs e) { Course c = new Course(); c.Department = tbDepartment.Text; c.SectionNum = int.Parse(tbCourseNum.Text); c.Title = tbTitle.Text; c.Days = cbDays.SelectedValue; c.StartTime = DateTime.Parse(tbStartTime.Text); c.EndTime = DateTime.Parse(tbEndTime.Text); c.Professor = tbProfessor.Text; c.Credits = int.Parse(tbCredits.Text); c.UserID = int.Parse(Session["CurrentUser_UserID"].ToString()); BuildScheduleController con = new BuildScheduleController(ConfigurationManager.ConnectionStrings["DBInformation"].ToString()); con.InsertCourse(c); }
protected void InsertCourse(Course c) { BuildScheduleController con = new BuildScheduleController(ConfigurationManager.ConnectionStrings["DBInformation"].ToString()); con.InsertCourse(c); }