private void silToolStripMenuItem_Click(object sender, EventArgs e) { DialogResult answer = MessageBox.Show("Silmek istediğinize emin misiniz", "Uyarı", MessageBoxButtons.YesNo, MessageBoxIcon.Stop); if (answer == DialogResult.Yes) { foreach (ListViewItem li in lstwCategories.SelectedItems) { cat = li.Tag as Entity.Categories; } catDAL.Delete(cat.id); cat.ListVieweDoldur(lstwCategories); } }
private void btnUpdate_Click(object sender, EventArgs e) { Entity.Categories cat = new Entity.Categories(); foreach (ListViewItem li in lstwCategories.SelectedItems) { cat = li.Tag as Entity.Categories; } cat.CategoryName = txtCategoryName.Text; cat.Description = txtDescription.Text; catDAL.Update(cat); cat.ListVieweDoldur(lstwCategories); Entity.Entity en = new Entity.Entity(); en.Temizle(groupBox1); }
private void frmDeleteCategories_Load(object sender, EventArgs e) { cat.ListVieweDoldur(lstwCategories); }
private void frmListCategories_Load(object sender, EventArgs e) { Entity.Categories cat = new Entity.Categories(); cat.ListVieweDoldur(lstwCategories); }