protected override void Hapus()
        {
            var index = this.gridList.SelectedIndex;

            if (!base.IsSelectedItem(index, this.Text))
            {
                return;
            }

            if (MsgHelper.MsgDelete())
            {
                var jenisPengeluaran = _listOfJenisPengeluaran[index];

                var result = _bll.Delete(jenisPengeluaran);
                if (result > 0)
                {
                    GridListControlHelper.RemoveObject <JenisPengeluaran>(this.gridList, _listOfJenisPengeluaran, jenisPengeluaran);
                    ResetButton();
                }
                else
                {
                    MsgHelper.MsgDeleteError();
                }
            }
        }
        public void DeleteTest()
        {
            var obj = new JenisPengeluaran
            {
                jenis_pengeluaran_id = "f896b0f7-9675-4dc2-bf03-06e1dc6977d1"
            };

            var result = _bll.Delete(obj);

            Assert.IsTrue(result != 0);

            var deletedObj = _bll.GetByID(obj.jenis_pengeluaran_id);

            Assert.IsNull(deletedObj);
        }
Example #3
0
        public void DeleteTest()
        {
            var obj = new JenisPengeluaran
            {
                jenis_pengeluaran_id = "0c9ef589-be0c-415d-8fec-19ddafd942c2"
            };

            var result = _bll.Delete(obj);

            Assert.IsTrue(result != 0);

            var deletedObj = _bll.GetByID(obj.jenis_pengeluaran_id);

            Assert.IsNull(deletedObj);
        }