private void AddButton_Click(object sender, EventArgs e) { List <string> values = new List <string>(); values.Add(String.Format("\"{0}\"", NameBox.Text)); values.Add(String.Format("{0}", AgeBox.Text)); values.Add(String.Format("\"{0}\"", PhoneBox.Text)); values.Add(String.Format("\"{0}\"", AddressBox.Text)); values.Add("0"); DbConnector.GetInstance().AddEntry("patient", values); this._parent.Enabled = true; PatientList list = (PatientList)this._parent; list.LoadEntries(); this.Close(); }
void PatientsTab_Enter(object sender, EventArgs e) { PatientList list = (PatientList)PatientsTab.Controls[0]; list.LoadEntries(); }