private void buttonAddCategory_Click(object sender, EventArgs e) { Category cat = new Category { Name = textCategoryName.Text, Description = textCategoryDescription.Text, Added = DateTime.Now, Modified = DateTime.Now }; cat.Save(); Categories.Add(cat); var index = Categories.BaseIndexOf(cat); LoadCategories(); checkedList.SetItemChecked(index, true); textCategoryName.Text = ""; textCategoryDescription.Text = ""; }