/* * Pre: There must exist a contact with the input contact id * Post: The informatin of the contact with the input contact id is loaded to the page * @param contactId is the contact id of the contact to load */ private void loadContact(int contactId) { Contact contact = new Contact(contactId); if (contact.id != -1) { Session[contactVar] = contact; //load contact data to form lblId.Text = contact.id.ToString(); txtFirstNameSearch.Text = contact.firstName; txtLastNameSearch.Text = contact.lastName; lblName.Text = contact.firstName + " " + contact.middleInitial + " " + contact.lastName; lblDistrict.Text = DbInterfaceStudent.GetStudentDistrict(contact.districtId); lblContactType.Text = contact.contactTypeId; string mtnaId = DbInterfaceContact.GetMtnaId(contact.id); if (!mtnaId.Equals("")) { txtMtnaId.Text = mtnaId; txtMtnaId.Enabled = false; } } else { lblContactSearchError.Text = "An error occurred during the search"; lblContactSearchError.Visible = true; } }