Esempio n. 1
0
        protected override void Hapus()
        {
            var index = this.gridList.SelectedIndex;

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

            if (MsgHelper.MsgDelete())
            {
                var supplier = _listOfSupplier[index];

                using (new StCursor(Cursors.WaitCursor, new TimeSpan(0, 0, 0, 0)))
                {
                    var result = _bll.Delete(supplier);
                    if (result > 0)
                    {
                        GridListControlHelper.RemoveObject <Supplier>(this.gridList, _listOfSupplier, supplier);
                        ResetButton();
                    }
                    else
                    {
                        MsgHelper.MsgDeleteError();
                    }
                }
            }
        }
Esempio n. 2
0
        public void DeleteTest()
        {
            var obj = new Supplier
            {
                supplier_id = "7859f705-6b0f-4c06-9bd0-e9f5f7b87414"
            };

            var result = _bll.Delete(obj);

            Assert.IsTrue(result != 0);

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

            Assert.IsNull(deletedObj);
        }
        public void DeleteTest()
        {
            var obj = new Supplier
            {
                supplier_id = "5b3704f5-83a4-4b98-a7a7-1b09fd62d356"
            };

            var result = _bll.Delete(obj);

            Assert.IsTrue(result != 0);

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

            Assert.IsNull(deletedObj);
        }