Ejemplo n.º 1
0
        internal HssUtility.SQLserver.DB_insert Get_DBinsert()
        {
            HssUtility.SQLserver.DB_insert dbIns = new HssUtility.SQLserver.DB_insert(SavedFilesCustodianBalance.Get_cmdTP());

            dbIns.AddValue("originalFileName", this.originalFileName);/*Optional 2*/
            dbIns.AddValue("SavedFiles_XML_CB", this.SavedFiles_XML_CB);
            dbIns.AddValue("AnnouncementName", this.AnnouncementName.Value);
            dbIns.AddValue("AnnouncementSender", this.AnnouncementSender.Value);
            dbIns.AddValue("AnnouncementIdentifier", this.AnnouncementIdentifier.Value);
            dbIns.AddValue("AnnouncementDate", this.AnnouncementDate.Value);
            dbIns.AddValue("UniqueUniversalEventIdentifier", this.UniqueUniversalEventIdentifier.Value);
            dbIns.AddValue("SECURITY_IDENTIFIER_CUSIP", this.SECURITY_IDENTIFIER_CUSIP.Value);
            dbIns.AddValue("ISSUER_NAME", this.ISSUER_NAME.Value);
            dbIns.AddValue("ADR_RECORD_DATE", this.ADR_RECORD_DATE.Value);
            dbIns.AddValue("ADRBase", this.ADRBase);             /*Optional 12*/
            dbIns.AddValue("OrdinaryShare", this.OrdinaryShare); /*Optional 13*/
            dbIns.AddValue("source", this.source.Value);
            dbIns.AddValue("processState", this.processState.Value);
            dbIns.AddValue("WhenProcessed", this.WhenProcessed);     /*Optional 16*/
            dbIns.AddValue("Processedby", this.Processedby);         /*Optional 17*/
            dbIns.AddValue("flgLock", this.flgLock);                 /*Optional 18*/
            dbIns.AddValue("WhenLocked_date", this.WhenLocked_date); /*Optional 19*/
            dbIns.AddValue("LockedBy_userid", this.LockedBy_userid); /*Optional 20*/
            dbIns.AddValue("createdby", this.createdby.Value);
            dbIns.AddValue("createddate", this.createddate.Value);
            dbIns.AddValue("ID_GTS_SFTP_InputSITEs", this.ID_GTS_SFTP_InputSITEs);/*Optional 23*/

            return(dbIns);
        }
Ejemplo n.º 2
0
        internal HssUtility.SQLserver.DB_update Get_DBupdate()
        {
            if (!this.CheckValueChanges())
            {
                return(null);
            }

            HssUtility.SQLserver.DB_update upd = new HssUtility.SQLserver.DB_update(SavedFilesCustodianBalance.Get_cmdTP());
            if (this.originalFileName.ValueChanged)
            {
                upd.AddValue("originalFileName", this.originalFileName);
            }
            //if (this.SavedFiles_XML_CB.ValueChanged) upd.AddValue("SavedFiles_XML_CB", this.SavedFiles_XML_CB);
            if (this.AnnouncementName.ValueChanged)
            {
                upd.AddValue("AnnouncementName", this.AnnouncementName);
            }
            if (this.AnnouncementSender.ValueChanged)
            {
                upd.AddValue("AnnouncementSender", this.AnnouncementSender);
            }
            if (this.AnnouncementIdentifier.ValueChanged)
            {
                upd.AddValue("AnnouncementIdentifier", this.AnnouncementIdentifier);
            }
            if (this.AnnouncementDate.ValueChanged)
            {
                upd.AddValue("AnnouncementDate", this.AnnouncementDate);
            }
            if (this.UniqueUniversalEventIdentifier.ValueChanged)
            {
                upd.AddValue("UniqueUniversalEventIdentifier", this.UniqueUniversalEventIdentifier);
            }
            if (this.SECURITY_IDENTIFIER_CUSIP.ValueChanged)
            {
                upd.AddValue("SECURITY_IDENTIFIER_CUSIP", this.SECURITY_IDENTIFIER_CUSIP);
            }
            if (this.ISSUER_NAME.ValueChanged)
            {
                upd.AddValue("ISSUER_NAME", this.ISSUER_NAME);
            }
            if (this.ADR_RECORD_DATE.ValueChanged)
            {
                upd.AddValue("ADR_RECORD_DATE", this.ADR_RECORD_DATE);
            }
            if (this.ADRBase.ValueChanged)
            {
                upd.AddValue("ADRBase", this.ADRBase);
            }
            if (this.OrdinaryShare.ValueChanged)
            {
                upd.AddValue("OrdinaryShare", this.OrdinaryShare);
            }
            if (this.source.ValueChanged)
            {
                upd.AddValue("source", this.source);
            }
            if (this.processState.ValueChanged)
            {
                upd.AddValue("processState", this.processState);
            }
            if (this.WhenProcessed.ValueChanged)
            {
                upd.AddValue("WhenProcessed", this.WhenProcessed);
            }
            if (this.Processedby.ValueChanged)
            {
                upd.AddValue("Processedby", this.Processedby);
            }
            if (this.flgLock.ValueChanged)
            {
                upd.AddValue("flgLock", this.flgLock);
            }
            if (this.WhenLocked_date.ValueChanged)
            {
                upd.AddValue("WhenLocked_date", this.WhenLocked_date);
            }
            if (this.LockedBy_userid.ValueChanged)
            {
                upd.AddValue("LockedBy_userid", this.LockedBy_userid);
            }
            if (this.createdby.ValueChanged)
            {
                upd.AddValue("createdby", this.createdby);
            }
            if (this.createddate.ValueChanged)
            {
                upd.AddValue("createddate", this.createddate);
            }
            if (this.ID_GTS_SFTP_InputSITEs.ValueChanged)
            {
                upd.AddValue("ID_GTS_SFTP_InputSITEs", this.ID_GTS_SFTP_InputSITEs);
            }

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

            return(upd);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Initialize object from DB
        /// </summary>
        public bool Init_from_DB()
        {
            if (this.id_SavedFilesCustodianBalance < 0)
            {
                return(false);
            }

            HssUtility.SQLserver.DB_select db_sel = new HssUtility.SQLserver.DB_select(SavedFilesCustodianBalance.Get_cmdTP());
            db_sel.tableName = "SavedFilesCustodianBalance";
            HssUtility.SQLserver.SQL_relation rela = new HssUtility.SQLserver.SQL_relation("id_SavedFilesCustodianBalance", HssUtility.General.RelationalOperator.Equals, this.id_SavedFilesCustodianBalance);
            db_sel.SetCondition(rela);

            bool res_flag = false;

            HssUtility.SQLserver.DB_reader reader = new HssUtility.SQLserver.DB_reader(db_sel, Utility.Get_XBRL_hDB());
            if (reader.Read())
            {
                this.Init_from_reader(reader);
                res_flag = true;
            }
            reader.Close();
            return(res_flag);
        }