예제 #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  = "";
        }
예제 #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);
         }
     }
 }
예제 #3
0
 private void LoadPeopleList()
 {
     people = SqlLiteDataAccess.LoadAllPeople();
     WrireUpPeopleList();
 }