コード例 #1
0
ファイル: SavedFiles_CSV.cs プロジェクト: huangss0/GTS0
        /// <summary>
        /// Initialize object from DB
        /// </summary>
        public bool Init_from_DB(bool ignore_binary, bool ignore_SchemaData)
        {
            if (this.id_SavedFiles_CSV < 0)
            {
                return(false);
            }

            HssUtility.SQLserver.DB_select db_sel = new HssUtility.SQLserver.DB_select(SavedFiles_CSV.Get_cmdTP());
            db_sel.tableName = "SavedFiles_CSV";
            if (ignore_binary)
            {
                db_sel.IgnoreColumn("SavedFiles_CSV");
                db_sel.IgnoreColumn("cpuSavedFiles_CSV");
            }
            if (ignore_SchemaData)
            {
                db_sel.IgnoreColumn("OriginalSchema");
                db_sel.IgnoreColumn("OriginalData");
            }

            HssUtility.SQLserver.SQL_relation rela = new HssUtility.SQLserver.SQL_relation("id_SavedFiles_CSV", HssUtility.General.RelationalOperator.Equals, this.id_SavedFiles_CSV);
            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);
        }
コード例 #2
0
ファイル: XBRL_SavedFile.cs プロジェクト: huangss0/GTS0
        /// <summary>
        /// Initialize object from DB
        /// </summary>
        public bool Init_from_DB(bool ignore_savedfile)
        {
            if (this.id_SavedfilesRcvd < 0)
            {
                return(false);
            }

            HssUtility.SQLserver.DB_select db_sel = new HssUtility.SQLserver.DB_select(XBRL_SavedFile.Get_cmdTP());
            if (ignore_savedfile)
            {
                db_sel.IgnoreColumn("savedfile");
            }
            db_sel.tableName = "SavedFiles";
            HssUtility.SQLserver.SQL_relation rela = new HssUtility.SQLserver.SQL_relation("id_SavedfilesRcvd", HssUtility.General.RelationalOperator.Equals, this.id_SavedfilesRcvd);
            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);
        }
コード例 #3
0
        /// <summary>
        /// Initialize object from DB
        /// </summary>
        public bool Init_from_DB()
        {
            HssUtility.SQLserver.SQL_relation rela = null;
            if (this.pk_ID > 0)
            {
                rela = new HssUtility.SQLserver.SQL_relation("ID", HssUtility.General.RelationalOperator.Equals, this.ID);
            }
            else
            {
                if (UserName.IsValueEmpty)
                {
                    return(false);
                }
                else
                {
                    rela = new HssUtility.SQLserver.SQL_relation("UserName", HssUtility.General.RelationalOperator.Equals, this.UserName.Value);
                }
            }

            HssUtility.SQLserver.DB_select db_sel = new HssUtility.SQLserver.DB_select(Hss_UserConfig.Get_cmdTP());
            db_sel.tableName = "Hss_UserConfig";
            db_sel.SetCondition(rela);

            bool res_flag = false;

            HssUtility.SQLserver.DB_reader reader = new HssUtility.SQLserver.DB_reader(db_sel, Utility.Get_DRWIN_hDB());
            if (reader.Read())
            {
                this.Init_from_reader(reader);
                res_flag = true;
            }
            reader.Close();
            return(res_flag);
        }
コード例 #4
0
ファイル: Security.cs プロジェクト: huangss0/GTS0
        /// <summary>
        /// Initialize object from DB
        /// </summary>
        public bool Init_from_DB()
        {
            if (this.SecurityID < 0)
            {
                return(false);
            }

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

            bool res_flag = false;

            HssUtility.SQLserver.DB_reader reader = new HssUtility.SQLserver.DB_reader(db_sel, Utility.Get_DRWIN_hDB());
            if (reader.Read())
            {
                this.Init_from_reader(reader);
                res_flag = true;
            }
            reader.Close();
            return(res_flag);
        }
コード例 #5
0
ファイル: Country.cs プロジェクト: huangss0/GTS0
        /// <summary>
        /// Initialize object from DB
        /// </summary>
        public bool Init_from_DB()
        {
            if (string.IsNullOrEmpty(this.name))
            {
                return(false);
            }

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

            bool res_flag = false;

            HssUtility.SQLserver.DB_reader reader = new HssUtility.SQLserver.DB_reader(db_sel, Utility.Get_DRWIN_hDB());
            if (reader.Read())
            {
                this.Init_from_reader(reader);
                res_flag = true;
            }
            reader.Close();
            return(res_flag);
        }
コード例 #6
0
        public bool Init_from_DB()
        {
            if (this.depositary_idemnification_id < 0)
            {
                return(false);
            }

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

            bool res_flag = false;

            HssUtility.SQLserver.DB_reader reader = new HssUtility.SQLserver.DB_reader(db_sel, Utility.Get_DRWIN_hDB());
            if (reader.Read())
            {
                this.Init_from_reader(reader);
                res_flag = true;
            }
            reader.Close();
            return(res_flag);
        }
コード例 #7
0
ファイル: PrimaryCustodian.cs プロジェクト: huangss0/GTS0
        /// <summary>
        /// Initialize object from DB
        /// </summary>
        public bool Init_from_DB()
        {
            if (this.primary_custodian_id < 0)
            {
                return(false);
            }

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

            bool res_flag = false;

            HssUtility.SQLserver.DB_reader reader = new HssUtility.SQLserver.DB_reader(db_sel, Utility.Get_ESP2_hDB());
            if (reader.Read())
            {
                this.Init_from_reader(reader);
                res_flag = true;
            }
            reader.Close();
            return(res_flag);
        }
コード例 #8
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);
        }
コード例 #9
0
        /// <summary>
        /// Initialize object from DB
        /// </summary>
        public bool Init_from_DB()
        {
            if (this.event_contact_info_id < 0)
            {
                return(false);
            }

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

            bool res_flag = false;

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