public void TeacherAddCourse() { string path = BusyworkManage.Path; string teacherid = Request.Cookies["TeacherID"].Value.ToString(); string topic = Server.MapPath(path + teacherid + BusyworkManage.TopicPath); string busywork = Server.MapPath(path + teacherid + BusyworkManage.BusyworkPath); string coursename = txtCourseName.Text.ToString().Trim(); BusyworkManage bm = new BusyworkManage(); bool result = bm.TeacherAddCourse(teacherid, coursename, topic, busywork); if (result == true) { Response.Write("<Script language='JavaScript'>alert('" + "添加成功!" + "');</Script>"); } else { Response.Write("<Script language='JavaScript'>alert('" + "添加失败!" + "');</Script>"); } }