public bool UpdateChanges()
        {
            bool r = false;

            if (this.IsUsable)
            {
                if (this.mAction == ObjectAction.Save || this.mAction == ObjectAction.Delete)
                {
                    bool hasTransaction = (AppDAL.HasTransaction ? false : AppDAL.BiginTransaction());

                    switch (this.mAction)
                    {
                    case ObjectAction.Save:
                        r = (this.IsNew ? this.InsertRecord() : this.UpdateRecord()) && this.UpdateChild();
                        if (r)
                        {
                            this.mStatus = ObjectStatus.Opened;
                        }
                        break;

                    case ObjectAction.Delete:
                        r = (this.IsOpen ? this.UpdateChild() && this.DeleteRecord() : true);
                        if (r)
                        {
                            this.Reset();
                        }
                        break;

                    default:
                        r = true;
                        break;
                    }

                    if (hasTransaction)
                    {
                        if (r)
                        {
                            AppDAL.OKTransaction();
                        }
                        else
                        {
                            AppDAL.CancelTransaction();
                        }
                    }
                }
                else
                {
                    r = true;
                }
            }

            return(r);
        }