Esempio n. 1
0
        protected void GridViewLecturers_PageIndexChanging(object sender, GridViewPageEventArgs e)
        {
            ClassLecturer searchLecturer = new ClassLecturer();

            searchLecturer.SearchLecturer(ddSearch, txSearch, GridViewLecturers);
            GridViewLecturers.PageIndex = e.NewPageIndex;
            GridViewLecturers.DataBind();
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
        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);
        }
Esempio n. 4
0
        protected void btnSearch_Click(object sender, EventArgs e)
        {
            ClassLecturer searchLecturer = new ClassLecturer();

            searchLecturer.SearchLecturer(ddSearch, txSearch, GridViewLecturers);
        }
Esempio n. 5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ClassLecturer generateLecturerId = new ClassLecturer();

            txAddLecturerId.Text = generateLecturerId.GenerateLecturerId();
        }