protected void GridViewLecturers_PageIndexChanging(object sender, GridViewPageEventArgs e) { ClassLecturer searchLecturer = new ClassLecturer(); searchLecturer.SearchLecturer(ddSearch, txSearch, GridViewLecturers); GridViewLecturers.PageIndex = e.NewPageIndex; GridViewLecturers.DataBind(); }
protected void btnUpdateLecturerSubmit_Click(object sender, EventArgs e) { ClassLecturer updateLecturer = new ClassLecturer(); updateLecturer.UpdateLecturer(this); string messageString = txUpdateFirstName.Text + " " + txUpdateLastName.Text + " has successfully updated."; ClientScript.RegisterStartupScript(this.GetType(), "Successful", "alert('" + messageString + "'); window.location='Lecturers.aspx';", true); }
protected void btnAddLecturerSubmit_Click(object sender, EventArgs e) { Label lblAddedBy = this.Master.FindControl("lblLoggedInUser") as Label; ClassLecturer addLecturer = new ClassLecturer(); addLecturer.AddNewLecturer(this, lblAddedBy); string messageString = txAddFirstName.Text + " " + txAddLastName.Text + " has successfully registered. Lecturer ID is " + txAddLecturerId.Text; ClientScript.RegisterStartupScript(this.GetType(), "Successful", "alert('" + messageString + "'); window.location='Lecturers.aspx';", true); }
protected void btnSearch_Click(object sender, EventArgs e) { ClassLecturer searchLecturer = new ClassLecturer(); searchLecturer.SearchLecturer(ddSearch, txSearch, GridViewLecturers); }
protected void Page_Load(object sender, EventArgs e) { ClassLecturer generateLecturerId = new ClassLecturer(); txAddLecturerId.Text = generateLecturerId.GenerateLecturerId(); }