{          inttimeHour=DateTime.Now.Hour;          if(timeHour==3)            stata=0;          #region更新学生基本信息          if(studentbegintime<=timeHour&&timeHour         {          inttimeHour=DateTime.Now.Hour;          if(timeHour==3)            stata=0;          #region更新学生基本信息          if(studentbegintime<=timeHour&&timeHour
登录
首页 » C# » C#自动更新服务(本地服务安装)

C#自动更新服务(本地服务安装)

于 2015-03-11 发布
0 277
下载积分: 1 下载次数: 0

代码说明:

using System;using System.Collections.Generic;using System.Linq;using System.Text;using Common.WinService;using Common.Log;using System.Threading;using Common.Net;using System.Text.RegularExpressions;namespace Collection.AutoRunner{    //获取学生信息    public class Service_Update_Data : IWindowsService    {        private ILogWriter _logWriter = null;        private const string logCategory = "Services.Info";        private string logInfoSource = "Update_Data";        private const string logErrorCategory = "Services.Error";        private const string logErrorSource = "Update_Data_Error";        private bool BeStop = true;        private System.Timers.Timer timer = null;        public void Start(Common.Log.ILogWriter logWriter, string gameCode)        {            gameCode = gameCode.ToUpper();            logInfoSource = gameCode;            _logWriter = logWriter;            BeStop = false;            StartRequestData();        }        int stata = 0;        private void StartRequestData()        {            try            {                #region 配置                //时间频率                var UpdateStudentSpan = ServiceHelper.GetInterval("UpdateData");                //更新学生开始时间                var studentbegintime = ServiceHelper.GetInterval("StudentBeginTime");                //更新学生结束时间                var studentendtime = ServiceHelper.GetInterval("StudentEndTime");                    //是否更新学生基本信息:true为更新 false为不更新                var IsUpdateStudnet =Convert.ToBoolean(ServiceHelper.GetSystemConfig("IsUpdateStudnet"));                                #endregion                timer = ServiceHelper.ExcuteByTimer(UpdateStudentSpan, () =>                {                    int timeHour = DateTime.Now.Hour;                    if (timeHour == 3)                        stata = 0;                    #region 更新学生基本信息                    if (studentbegintime

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • GetSystemVer
    Windows下获取操作系统版本信息的小程序(Windows operating system version information under the access of small procedures)
    2009-02-06 12:01:21下载
    积分:1
  • C# 读取 WebBrowser中的图片验证码到pictureBox 【已测试通过,附完整源码】
    用webbrowser打开网页后,读取网页中验证码图片至 picturebox控件, .net framework 2.0和.netframework 4.0 已测试通过 注意:   在COM 页上, 选择 Microsoft HTML Object Library ,添加mshtml 的引用。  使用命名空间  using mshtml。
    2013-03-08下载
    积分:1
  • Regedit
    C++实现的读写注册表的功能,可以直接读取某个键的值,设定某个键的值和删除某个键的值,非常方便。(Read and write C++ implementation of the registry function, you can directly read the value of a key, set the value of a key to delete a key value, very convenient.)
    2013-10-27 19:41:13下载
    积分:1
  • 6416198
    Similar to VB property sheet controls(Similar to the VB property sheet controls)
    2017-07-19 01:30:36下载
    积分:1
  • OperationSystem_RR
    操作系统 CPU调度 时间片轮转法 SSD系列课程 给有需要的同学(Operating System CPU time slice Round-Robin Scheduling SSD series of courses to students in need)
    2010-12-31 09:54:57下载
    积分:1
  • C#版本的取色器
    C#开发的取色器
    2013-01-15下载
    积分:1
  • Calculator
    而as过热和高品位i哦将通过配额将分批doi公平我( U800Cas u8FC7 u70ED u548C u9AD8 u54C1 u4F4Di u54E6 u5C06 u901A u8FC7 u914D u989D u5C06 u5206 u6279doi u5E32 u5E73 u6211)
    2017-05-24 21:07:34下载
    积分:1
  • C# 遍历所有 窗体句柄 源码
    C# 遍历所有 窗体句柄 源码
    2013-09-16下载
    积分:1
  • yes
    容积率kjl判决安排看见;‘ 破案的怕 片斗破 破萨克怕 阿道夫家具;佳得乐会计法阿道夫阿道夫阿道夫啊阿斯蒂芬安抚阿斯蒂芬’(saf asdf asdf adf asdf adsf asdf asdf asdf asdf asdfwqefsa asdf aadf asdf a)
    2017-05-01 14:17:17下载
    积分:1
  • Keyboard
    纯windows sdk 编程,键盘监视的小例子.(Net windows sdk programming, keyboard, monitor small example.)
    2010-03-02 14:26:04下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载