예제 #1
0
        private void BgwSubmit_DoWork(object sender, DoWorkEventArgs e)
        {
            IsOnceSubmit = true;
            string userid      = GlobalProperties.UserID;
            char   coolanttype = GlobalProperties.CoolantType;

            retry = true;
            while (retry)
            {
                try
                {
                    if (GlobalProperties.DatabaseStatus)
                    {
                        string datenow = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
                        DB_SFDB.InsertHistoryLoading(userid, coolanttype, datenow);
                        retry = false;
                    }
                }
                catch (Exception x)
                {
                    Core.Log.Error.Collect(x.StackTrace.ToString());
                }
                Thread.Sleep(100);
            }
        }
예제 #2
0
        private void BgwSubmit_DoWork(object sender, DoWorkEventArgs e)
        {
            IsOnceSubmit = true;
            string userid      = PublicProperties.UserID;
            char   coolanttype = PublicProperties.CoolantType;

            retry = true;
            while (retry)
            {
                try
                {
                    if (PublicProperties.DatabaseStatus)
                    {
                        string datenow = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
                        DB_SFDB.InsertHistoryLoading(userid, coolanttype, datenow);
                        retry = false;
                    }
                }
                catch { }
                Thread.Sleep(50);
            }
        }