日本a√视频在线,久久青青亚洲国产,亚洲一区欧美二区,免费g片在线观看网站

        <style id="k3y6c"><u id="k3y6c"></u></style>
        <s id="k3y6c"></s>
        <mark id="k3y6c"></mark>
          
          

          <mark id="k3y6c"></mark>

          新聞中心

          EEPW首頁(yè) > 消費(fèi)電子 > 設(shè)計(jì)應(yīng)用 > Timer定時(shí)器的設(shè)計(jì)方法

          Timer定時(shí)器的設(shè)計(jì)方法

          作者: 時(shí)間:2018-09-04 來(lái)源:網(wǎng)絡(luò) 收藏

          本文引用地址:http://yuyingmama.com.cn/article/201809/388353.htm

            if (ExcuteUpdate())

            {

            autoEvent.Set();

            }

            }

            /**////

            /// 更新

            ///

            ///

            private bool ExcuteUpdate()

            {

            try

            {

            //應(yīng)該從數(shù)據(jù)庫(kù)獲得Paper對(duì)象的集合,這里簡(jiǎn)略

            //ListpaperList = getPaperList();

            ListpaperList = new List();

            foreach (Paper item in paperList)

            {

            if (item.EndTime = DateTime.Now)

            {

            if (item.Status == Paper.StatusOfNormal)

            {

            item.Status = Paper.StatusOfTerminate;

            }

            }

            }

            /**/////執(zhí)行數(shù)據(jù)更新,這里省略

            return true;

            }

            catch

            {

            return false;

            }

            }

            }

            這是問(wèn)卷的實(shí)體類,只是簡(jiǎn)單的列出必要的屬性。

            Paper實(shí)體類

            /**////

            /// 實(shí)體類

            ///

            public class Paper

            {

            /**////

            /// 終止時(shí)間

            ///

            public DateTime EndTime;

            /**////

            /// 狀態(tài)

            ///

            public int Status;

            /**////

            /// 正常

            ///

            public const int StatusOfNormal = 1;

            /**////

            /// 終止

            ///

            public const int StatusOfTerminate = 2;

            /**////

            ///

            ///

            ///

            ///

            public Paper(int status, DateTime endTime)

            {

            Status = status;

            EndTime = endTime;

            }

            }


          上一頁(yè) 1 2 3 下一頁(yè)

          關(guān)鍵詞:

          評(píng)論


          相關(guān)推薦

          技術(shù)專區(qū)

          關(guān)閉