protected void RemoveFacilitator(object sender, EventArgs e) { String ID = Request.QueryString["ID"]; String[] name = FacilitatorDropDown.Text.Split(' '); String firstName = name[0]; String lastName = name[1]; RemoveDB(ID, "Facilitators", "FirstName", "LastName", name); ErrorMessage.Text = "Facilitator Successfully Removed"; FacilitatorDropDown.DataBind(); EditFacilitatorDropDown.DataBind(); }
protected void FacilitatorLast_Rename(object sender, EventArgs e) { String ID = Request.QueryString["ID"]; String Name = FacilitatorLast.Text; String[] FullName = EditFacilitatorDropDown.Text.Split(' '); if (FacilitatorLast.Text == "" || FacilitatorLast.Text == FullName[1]) { ErrorMessage.Text = "Please enter a valid last name"; } else { UpdateVariableDB(ID, "Stats", "FacilitatorLastName", Name, FullName); UpdateVariableDB(ID, "Facilitators", "LastName", Name, FullName); ErrorMessage.Text = "Sucessfully Renamed: " + EditFacilitatorDropDown.Text + " to: " + Name; EditFacilitatorDropDown.DataBind(); FacilitatorDropDown.DataBind(); FacilitatorLast.Text = ""; } }