Esempio n. 1
0
        internal DB_insert Get_DBinsert()
        {
            DB_insert dbIns = new DB_insert(DepositaryInfo.Get_cmdTP());

            dbIns.AddValue("depositary_name", this.depositary_name.Value);
            dbIns.AddValue("depositary_address1", this.depositary_address1.Value);
            dbIns.AddValue("depositary_address2", this.depositary_address2.Value);
            dbIns.AddValue("phone", this.phone.Value);
            dbIns.AddValue("fax", this.fax.Value);
            dbIns.AddValue("international_phone", this.international_phone.Value);
            dbIns.AddValue("depositary_full_name", this.depositary_full_name.Value);
            dbIns.AddValue("depositary_index", this.depositary_index.Value);
            dbIns.AddValue("active", this.active.Value);
            dbIns.AddValue("stamp_name", this.stamp_name.Value);

            return(dbIns);
        }
Esempio n. 2
0
        public static void Init_from_DB()
        {
            if ((DateTime.Now - DepositaryInfoMaster.lastUpdateTime).TotalHours < Utility.RefreshInterval)
            {
                return;
            }

            DepositaryInfoMaster.Reset();
            DB_select selt = new DB_select(DepositaryInfo.Get_cmdTP());

            DB_reader reader = new DB_reader(selt, Utility.Get_ESP2_hDB());

            while (reader.Read())
            {
                DepositaryInfo depo = new DepositaryInfo();
                depo.Init_from_reader(reader);

                DepositaryInfoMaster.depo_list.Add(depo);
            }
            reader.Close();

            DepositaryInfoMaster.lastUpdateTime = DateTime.Now;
        }