Esempio n. 1
0
        /***********************************************Static Methods******************************************************************/

        public static List <XBRL_SavedFile> Get_XBRL_fileList(HssStatus status)
        {
            List <XBRL_SavedFile> list = new List <XBRL_SavedFile>();

            DB_reader reader = XBRL_SavedFile_master.Get_DB_reader(status, null);

            while (reader.Read())
            {
                XBRL_SavedFile sf = new XBRL_SavedFile();
                sf.Init_from_reader(reader);
                list.Add(sf);
            }
            reader.Close();

            return(list);
        }
Esempio n. 2
0
        /// <summary>
        /// Invoke by UserControl to retrieve data
        /// </summary>
        public void Get_viewDT_async(HssStatus status, SQL_condition extraCond)
        {
            if (this.listThread != null)
            {
                this.threadStop_flag = true;
                this.listThread.Join();
            }

            this.sourceDT.Clear();//reset values
            this.XBRL_list.Clear();
            this.currList_id              = 0;
            this.threadStop_flag          = false;
            this.dataFinishedLoading_flag = false;

            this.curr_reader = XBRL_SavedFile_master.Get_DB_reader(status, extraCond);//create reader for multi-threading
            this.listThread  = new Thread(this.Get_XBRLlist_threadRun);
            this.listThread.Start();

            int loopCount = 0;

            while (true)
            {
                ++loopCount;
                Thread.Sleep(1);
                if (this.dataFinishedLoading_flag)
                {
                    break;
                }
                if (this.XBRL_list.Count > 50)
                {
                    break;
                }
            }

            //Console.WriteLine("---> XBRL_SavedFile_master info 0: loopCount = " + loopCount);
            this.Add_XBRLrows_to_DT(UltraGrid_helper.RowsLoaded_per_scroll * 2);
        }