public HttpResponseMessage DeletePermission(string code) { bll.DeletePermission(code); HttpResponseMessage response = new HttpResponseMessage() { StatusCode = HttpStatusCode.OK }; return(response); }
private void btnDelete_Click(object sender, EventArgs e) { DialogResult result = MessageBox.Show("Are you sure?", "Warning", MessageBoxButtons.YesNo); if (result == DialogResult.Yes) { if (detail.Sate == PermissionStates.Approved || detail.Sate == PermissionStates.Disapproved) { MessageBox.Show("You can not delete this permission"); } else { PermissionBLL.DeletePermission(detail.PermissionID); MessageBox.Show("Permission was deleted"); FillAll(); CleanFilters(); } } }