internal HssUtility.SQLserver.DB_update Get_DBupdate()
        {
            if (!this.CheckValueChanges())
            {
                return(null);
            }

            HssUtility.SQLserver.DB_update upd = new HssUtility.SQLserver.DB_update(DTCPositionModelNumber_Mapping.Get_cmdTP());
            if (this.Country.ValueChanged)
            {
                upd.AddValue("Country", this.Country);
            }
            if (this.Issue.ValueChanged)
            {
                upd.AddValue("Issue", this.Issue);
            }
            if (this.RecordYear.ValueChanged)
            {
                upd.AddValue("RecordYear", this.RecordYear);
            }
            if (this.IncomeEvent.ValueChanged)
            {
                upd.AddValue("IncomeEvent", this.IncomeEvent);
            }
            if (this.ModelNumber.ValueChanged)
            {
                upd.AddValue("ModelNumber", this.ModelNumber);
            }
            if (this.ADRRecordDate.ValueChanged)
            {
                upd.AddValue("ADRRecordDate", this.ADRRecordDate);
            }
            if (this.ORDPayDate.ValueChanged)
            {
                upd.AddValue("ORDPayDate", this.ORDPayDate);
            }
            if (this.SecurityTypeID.ValueChanged)
            {
                upd.AddValue("SecurityTypeID", this.SecurityTypeID);
            }
            if (this.ADRRecordDate_End.ValueChanged)
            {
                upd.AddValue("ADRRecordDate_End", this.ADRRecordDate_End);
            }
            if (this.AtSourceSumFromDetails.ValueChanged)
            {
                upd.AddValue("AtSourceSumFromDetails", this.AtSourceSumFromDetails);
            }

            HssUtility.SQLserver.SQL_relation rela = new HssUtility.SQLserver.SQL_relation("DTCModelMappingID", HssUtility.General.RelationalOperator.Equals, this.pk_ID);
            upd.SetCondition(rela);

            return(upd);
        }
        /// <summary>
        /// Save updates to DB
        /// </summary>
        public bool Update_to_DB()
        {
            HssUtility.SQLserver.DB_update upd = this.Get_DBupdate();
            if (upd == null)
            {
                return(false);
            }

            int  count = upd.SaveToDB(Utility.Get_DRWIN_hDB());
            bool flag  = count > 0;

            if (flag)
            {
                this.SyncWithDB();
            }

            return(flag);
        }