private void btn_AddPerson_Click(object sender, EventArgs e) { PersonModel personmodel = new PersonModel(); personmodel.Firstname = txt_FirstName.Text; personmodel.LastName = txt_LastName.Text; SqlLiteDataAccess.SavePerson(personmodel); txt_FirstName.Text = ""; txt_LastName.Text = ""; }
private void btn_Delete_Click(object sender, EventArgs e) { if (lst_Output.SelectedItems.Count > 0) { foreach (PersonModel model in lst_Output.SelectedItems) { SqlLiteDataAccess.DeletePerson(model.Id); } } }
private void LoadPeopleList() { people = SqlLiteDataAccess.LoadAllPeople(); WrireUpPeopleList(); }