{          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 185
下载积分: 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 个回复

  • cpu
    基于CpuUsage的CPU空闲时工作构思,就是当CPU有空时,才能进行自己程序的大量数据处理命令,找了好久,找到这个,并加以10个时间的查询,如都是有空,才说有空.分享给有这方面需要的朋友,抛砖引玉.(CpuUsage the CPU idle time based on the idea work, free time is when the CPU can process large amounts of data for their own processing order, looking for a long time to find this, and make inquiries 10 hours, such as are available, only that there empty. to share a need, a friend, start a discussion.)
    2011-09-16 15:04:46下载
    积分:1
  • C# 周立功can卡调用函数
    C# 周立功can卡调用函数
    2013-12-10下载
    积分:1
  • direce3D
    语音3D特效器制作, 获取3D缓冲区对象,最大距离和最小距离等具体设置(3D audio effects device production, access to 3D buffer object, the maximum distance and minimum distance from a specific set)
    2009-11-06 16:29:55下载
    积分:1
  • redistry
    对系统注册表的操作,及用相应的实现码进行编程。(The operation of the system registry, and with the realization of the corresponding programming code.)
    2016-05-07 21:18:42下载
    积分:1
  • CDirectoryChangeWatcher
    一个目录变化监控类,空闲时间写的,方便调用,可扩展(A directory change monitoring class, free time to write, easy call, scalable)
    2021-01-11 14:28:50下载
    积分:1
  • search_file
    说明:  实现目录中文件查找,遍历,基本实现dir功能(Document the achievement of the directory search, traversal, the basic function of the realization of dir)
    2009-08-17 21:48:22下载
    积分:1
  • entry_dos
    便捷的dos进入工具,非常方便开发人员使用,提高工作效率(Dos and convenient access to tools to developers is very convenient to use, improve efficiency)
    2011-05-18 17:06:13下载
    积分:1
  • PCA-SIFT
    一个基于matlab语言的编程,可以实现对人脸的识别算法(A matlab-based programming language can be achieved on the human face recognition algorithm)
    2010-01-05 09:55:24下载
    积分:1
  • CacheManager
    说明:  高效的内存管理机制和原理的分析,电子书籍,好资料(Efficient memory management mechanisms and principles of analysis, e-books, and good information)
    2009-07-21 23:01:27下载
    积分:1
  • JieMiJi
    产生程序序列号JieMiJi,很不错的vc源码,希望能对大家有所帮助(Generation process serial number JieMiJi, very good vc source, I hope you can help)
    2011-09-07 22:45:04下载
    积分:1
  • 696518资源总数
  • 105540会员总数
  • 37今日下载