//UPDATE protected void update_Click(object sender, EventArgs e) { try { //check to see if a insert is needed for deceased person = person.Select(Convert.ToInt32(Update_gvClientSearchresult.SelectedValue)); client = client.Select(person.person_id); if (Update_deceasedYes.Checked == true) { person = person_update(Convert.ToInt32(Update_gvClientSearchresult.SelectedValue)); missing = missing_update(person.person_id); //check if update of insert of deceased deceased = deceased.Select(client.client_id); if (deceased.deceased_id == 0) { deceased = deceased_insert_For_Update(); } else { deceased = deceased_update(person.person_id); } } else { person = person_update(Convert.ToInt32(Update_gvClientSearchresult.SelectedValue)); missing = missing_update(person.person_id); } address = address_update(person.address_id); client = client_update(person.person_id); encounter = encounter_insert(); Update_refreshclient(); } catch { Update_lbl_Client_Error.Text = "There has been an error updating information for the missing client."; } finally { Update_lbl_Client_Error.Text = "The missing client's information has been successfully updated."; } }
public deceased Insert_deceased_select(int ID) { deceased = deceased.Select(ID); Insert_date_of_autopsy_txt.Text = Convert.ToString(deceased.date_of_autopsy); Insert_external_exam_txt.Text = Convert.ToString(deceased.external_exam); Insert_identifying_marks_txt.Text = Convert.ToString(deceased.identifying_marks); Insert_internal_exam_txt.Text = Convert.ToString(deceased.internal_exam); Insert_reason_of_death_txt.Text = Convert.ToString(deceased.reason_of_death); Insert_time_of_death_txt.Text = Convert.ToString(deceased.time_of_death); return(deceased); }