protected override void Hapus() { var index = this.gridList.SelectedIndex; if (!base.IsSelectedItem(index, this.TabText)) { return; } if (MsgHelper.MsgDelete()) { var jabatan = _listOfJabatan[index]; using (new StCursor(Cursors.WaitCursor, new TimeSpan(0, 0, 0, 0))) { var result = _bll.Delete(jabatan); if (result > 0) { GridListControlHelper.RemoveObject <Jabatan>(this.gridList, _listOfJabatan, jabatan); ResetButton(); } else { MsgHelper.MsgDeleteError(); } } } }
public void DeleteTest() { var obj = new Jabatan { jabatan_id = "df864174-857d-4746-876f-ca1d59fb4df8" }; var result = _bll.Delete(obj); Assert.IsTrue(result != 0); var deletedObj = _bll.GetByID(obj.jabatan_id); Assert.IsNull(deletedObj); }
public void DeleteTest() { var obj = new Jabatan { jabatan_id = "a60c6afb-ea16-467d-98eb-d724c33fc578" }; var result = _bll.Delete(obj); Assert.IsTrue(result != 0); var deletedObj = _bll.GetByID(obj.jabatan_id); Assert.IsNull(deletedObj); }