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

  • barcode
    39条码的生成dll,生成的条码保持在数组里(the dll of creating barcode 39)
    2012-06-18 10:15:22下载
    积分:1
  • QPAUP
    C#编写的Win32Window函数库,可以在托管环境下面调用Native的Window方法,(C # to write the Win32Window function library, may call the Native Windows method under the hosting environment,)
    2017-07-15 21:24:21下载
    积分:1
  • C# qq自动发送消息 实例源码
    qq自动发送好友消息
    2014-08-08下载
    积分:1
  • CTP_API_Sample
    上期技术CTP接口示例源码,可以根据这个示例开发自己的交易平台(Examples of technology interfaces on the CTP source)
    2010-11-04 11:23:49下载
    积分:1
  • c++ 通过dao 读写 access文件 实例源码下载
    c++ 通过dao 读写 access文件 实例源码下载
    2015-03-16下载
    积分:1
  • kbhook
    用VC开发的驱动级键盘钩子源码,可以用户获取记录按键信息(Drive-level keyboard hook source)
    2013-10-12 17:58:16下载
    积分:1
  • ctc_ha
    利用VC实现的简单双机热备和地址漂移软件,双机均有自身IP, 但只有主机才具备服务IP,当主机中断后,备机可接管服务IP.(A simple tool just like HA software)
    2020-07-02 01:00:01下载
    积分:1
  • HBase
    辅助开发库HBase,很好用的个人代码总结库,开发人员经常会有很多经典的开发代码,下次使用仍然很频繁,HBase就做了很好的总结,方便了开发使用(Supporting the development of library HBase, well summed up by the personal code library, developers will often develop a lot of classical code, the next use is still very frequent, HBase on to do a very good summary of the development to facilitate the use of)
    2009-03-30 16:15:11下载
    积分:1
  • ControlDevice
    一个启用和禁用设备的例子,该代码展示了禁用和启用USB设备的功能。如果需要禁用软驱和光驱,需要修改相应的参数。(Enable and disable a device example, the code to display the disable and enable USB devices. If you need to disable the floppy drive and optical disk drive, a need to amend the corresponding parameters.)
    2008-04-03 11:52:26下载
    积分:1
  • c# 嵌入式开发 报警源码下载
    c# 嵌入式开发 报警系统源码下载
    2013-12-29下载
    积分:1
  • 696524资源总数
  • 103920会员总数
  • 65今日下载