Exemplo n.º 1
0
        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  = "";
        }
Exemplo n.º 2
0
 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);
         }
     }
 }
Exemplo n.º 3
0
 private void LoadPeopleList()
 {
     people = SqlLiteDataAccess.LoadAllPeople();
     WrireUpPeopleList();
 }