protected override Entity OnAdd()
        {
            var newItem = new Tax();

            using (var frm = new frmTaxTable_Add())
            {
                frm.ItemData = newItem;
                if (frm.ShowDialog() != DialogResult.OK)
                {
                    return(null);
                }
            }

            ItemDataCollection.Add(newItem);

            App.LogAction("Tax Table", "Created Tax Code : " + newItem.ShortDesc);

            return(newItem);
        }
        protected override bool OnEdit(Entity item)
        {
            var selectedItem = (Tax)item;

            using (var frm = new frmTaxTable_Add())
            {
                if (selectedItem.Id != 0)
                {
                    selectedItem.RowStatus = RecordStatus.ModifiedRecord;
                }
                frm.ItemData = selectedItem;
                if (frm.ShowDialog() != DialogResult.OK)
                {
                    return(false);
                }
            }

            App.LogAction("Tax Table", "Updated Tax Code : " + selectedItem.ShortDesc);

            return(true);
        }