protected void Button_Course_Application_Click(object sender, EventArgs e) { string course_id = Input_Course_ID.Text; string course_name = Input_Course_Name.Text; string course_credit = Input_Course_Credit.Text; string tch_id = Session["account_user_id"].ToString(); bool isChanged = CourseDBUtil.Add(course_id, course_name, course_credit, tch_id); if (isChanged) { string toastrScript = ToastrHelper.GetToastrScript("success", "提示", "开课申请成功。"); ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "script", toastrScript, true); } else { string toastrScript = ToastrHelper.GetToastrScript("danger", "提示", "开课申请失败。"); ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "script", toastrScript, true); } }
protected void Button_Add_Click(object sender, EventArgs e) { string course_id = Input_Add_Course_ID.Text; string course_name = Input_Add_Course_Name.Text; string course_credit = Input_Add_Course_Credit.Text; string tch_id = Input_Add_Tch_ID.Text; bool isChanged = CourseDBUtil.Add(course_id, course_name, course_credit, tch_id); if (isChanged) { string toastrScript = ToastrHelper.GetToastrScript("success", "提示", "添加课程信息成功。"); ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "script", toastrScript, true); } else { string toastrScript = ToastrHelper.GetToastrScript("danger", "提示", "添加课程信息失败。"); ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "script", toastrScript, true); } Data_Bind(); }