protected bool SaveMe(bool IsFiling = false)
        {
            // generally, inserts and deletes will be edge cases handled elsewhere, modified fields on existing rows are the primary save scenario for child lists hanging off main entities like TaxForm (e.g. TaxFormRemarks)

            //pulling back on this for now... seems theoretically possible to save a pending NF2 with un-printed status just like NF1's, it's not "issued" until it's printed
            //if (IsClass2 && !Validate())
            //{
            //  ShowUserMessage("It is invalid to save an NF2/EF2 that's not fully completed.");
            //  return (false);
            //}

            if (Fields.IsDirty()) //the "Fields" logic does actually need to be here if called from FileForm() rather than base.Save();
            {
                using (iTRAACProc TaxForm_u = new iTRAACProc("TaxForm_u"))
                {
                    TaxForm_u.AssignValues(Fields);
                    TaxForm_u["@IsFiling"] = IsFiling;
                    if (!TaxForm_u.ExecuteDataSet(UserMessagePrefix, true))
                    {
                        return(false);
                    }
                    Fields.AcceptChanges();
                    if (IsFiling)
                    {
                        TaxFormTable.Merge(TaxForm_u.Table0, false);
                    }
                }
            }

            if (ExtendedFields.IsDirty())
            {
                using (Proc TaxForm_TransactionTypeExt_u = new Proc("TaxForm_TransactionTypeExt_u"))
                {
                    TaxForm_TransactionTypeExt_u.AssignValues(ExtendedFields);
                    TaxForm_TransactionTypeExt_u["@TaxFormGUID"] = GUID;
                    if (!TaxForm_TransactionTypeExt_u.ExecuteNonQuery(UserMessagePrefix, false))
                    {
                        return(false);
                    }
                }
                ExtendedFields.AcceptChanges();
            }

            Remark.SaveRemarks("FKRowGUID", GUID, UserMessagePrefix, TaxFormRemarks);

            return(true);
        }
            public void Execute()
            {
                Assert.Check(GUID == null, String.Format("Invalid: Attempting to re-create a Package that's already been initialzed in the DB. [PacakgeCode: {0}]", PackageCode));

                using (iTRAACProc TaxFormPackage_New = new iTRAACProc("TaxFormPackage_New"))
                {
                    TaxFormPackage_New["@FormTypeID"]  = Convert.ToInt32(FormType);
                    TaxFormPackage_New["@FormCount"]   = Qty;
                    TaxFormPackage_New["@SponsorGUID"] = SponsorGUID;
                    TaxFormPackage_New["@ClientGUID"]  = AuthorizedDependentClientGUID;
                    TaxFormPackage_New["@Pending"]     = IsPending;

                    TaxFormPackage_New.ExecuteNonQuery();

                    this.Price       = (decimal)TaxFormPackage_New["@ServiceFee"];
                    this.GUID        = TaxFormPackage_New["@TaxFormPackageGUID"].ToString();
                    this.PackageCode = TaxFormPackage_New["@PackageCode"].ToString();
                }

                TaxForm.FormStatusChangeCallback(SponsorGUID);
            }
        public bool ReturnForm(bool IsClosing = false, bool DisplaySuccess = true)
        {
            using (Proc TaxForm_ReturnFile = new iTRAACProc("TaxForm_ReturnFile"))
            {
                TaxForm_ReturnFile["@TaxFormGUID"] = GUID;
                TaxForm_ReturnFile["@File"]        = 0;
                if (!TaxForm_ReturnFile.ExecuteDataSet(UserMessagePrefix + "Return - ", true))
                {
                    return(false);
                }

                //if we're firing Returned and this object is remaining visible (i.e. user didn't select the Return-and-Close button) then pull back the updated values reflecting the Returned status change
                if (!IsClosing)
                {
                    TaxFormTable.Merge(TaxForm_ReturnFile.Table0, false);
                    OnPropertyChanged("Fields"); //nugget: amazingly inconsistent IMHO, DataTable.Merge() does *not* fire DataRowView.PropertyChanged events!?! (tsk tsk Microsoft!!)
                }
            }

            OnFormStatusChange();
            return(true);
        }