public static void Delete(Occupation occupation) { Db.Transact(() => { occupation.Delete(); }); }
private void deleteBtn_Click(object sender, EventArgs e) { using (Occupation occu = new Occupation(true)) { occu.ID = occuID; if (MessageView.ShowQuestionMsg("Delete Details of '" + nameTextBoxX.Text + "'") == DialogResult.OK) { occu.Delete(); clear(); MessageView.ShowMsg("Sucessfully Deleted"); } } }