示例#1
0
        async void timer_tick(object sender, EventArgs e)
        {
            time++;

            loadingRectangle.Width += 1;
            DataSet             ds;
            database_connection dc = new database_connection();
            string query;

            if (loadingRectangle.Width >= 755)
            {
                timer.Interval          = TimeSpan.FromMilliseconds(1000);
                query                   = $@"select * From BeginningInventory";
                loadingRectangle.Width += 1;
                ds = await dc.Connection1Async(query);

                loadingRectangle.Width += 1;
                query = $@"select * From IssuanceInventory";
                loadingRectangle.Width += 1;
                ds = await dc.Connection1Async(query);

                loadingRectangle.Width += 1;
                query = $@"select * From EndingInventory";
                loadingRectangle.Width += 1;
                ds = await dc.Connection1Async(query);

                loadingRectangle.Width += 1;
                query = $@"select * From ItemDetailss";
                loadingRectangle.Width += 1;
                ds = await dc.Connection1Async(query);

                loadingRectangle.Width += 1;
                query = $@"select * From RequestorVieww";
                loadingRectangle.Width += 1;
                ds = await dc.Connection1Async(query);

                loadingRectangle.Width += 1;
                query = $@"select * From userlogin";
                loadingRectangle.Width += 1;
                ds = await dc.Connection1Async(query);

                loadingRectangle.Width += 1;
                query = $@"select * From adminlogin";
                loadingRectangle.Width += 1;
                ds = await dc.Connection1Async(query);

                loadingRectangle.Width += 1;
                if (loadingRectangle.Width >= 760)
                {
                    MainWindow mw = new MainWindow();
                    timer.Stop();
                    this.Close();
                    mw.Show();
                }
            }
        }
示例#2
0
        async void loadData()
        {
            DataSet             ds;
            database_connection dc = new database_connection();
            string query;

            query = $@"select * From BeginningInventory";
            loadingRectangle.Width += 665;
            ds = await dc.Connection1Async(query);

            loadingRectangle.Width += 670;
            query = $@"select * From IssuanceInventory";
            loadingRectangle.Width += 680;
            ds = await dc.Connection1Async(query);

            loadingRectangle.Width += 685;
            query = $@"select * From EndingInventory";
            loadingRectangle.Width += 695;
            ds = await dc.Connection1Async(query);

            loadingRectangle.Width += 700;
            query = $@"select * From ItemDetailss";
            loadingRectangle.Width += 710;
            ds = await dc.Connection1Async(query);

            loadingRectangle.Width += 715;
            query = $@"select * From RequestorVieww";
            loadingRectangle.Width += 725;
            ds = await dc.Connection1Async(query);

            loadingRectangle.Width += 730;
            query = $@"select * From userlogin";
            loadingRectangle.Width += 740;
            ds = await dc.Connection1Async(query);

            loadingRectangle.Width += 745;
            query = $@"select * From adminlogin";
            loadingRectangle.Width += 755;
            ds = await dc.Connection1Async(query);

            loadingRectangle.Width += 760;
            MainWindow mw = new MainWindow();

            timer.Stop();
            mw.Show();
        }