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

  • secondwatch2
    毫秒计时程序(millisecond time procedure)
    2005-01-15 21:00:37下载
    积分:1
  • C# 串口读写序 串口通讯示例源码
    C# 串口读写程序 串口通讯示例源码
    2014-03-26下载
    积分:1
  • BaseKeyDemo
    基本键盘操作的vc程序源码,感兴趣的可以看看,推荐!!!(Basic keyboard operation vc program source code, can be of interest to see, recommended! ! !)
    2011-09-21 22:20:11下载
    积分:1
  • 分贝显示器,实时显示声音强度 源码下载
    分贝显示器,实时显示声音强度 源码下载
    2013-12-14下载
    积分:1
  • Go-ICP_V1.3
    Go ICP for the registration of point couds
    2017-03-06 23:42:41下载
    积分:1
  • HIDUSB
    Windows 系统下 1.USB设备的查找: 2.发送数据到USB设备: 3.接收数据从USB设备:(Windows system 1. USB device search: 2. Send data to USB device: 3. Receive data from USB devices:)
    2008-05-27 13:26:13下载
    积分:1
  • C# GSM Modem短信的 发送/接收 示例源码下载
    C# GSM Modem短信的 发送/接收 示例源码下载
    2014-03-26下载
    积分:1
  • CrashRpt_v.1.4.2_r1609
    开源 异常 捕获上传程序 非常有用 值得学习(very useful)
    2015-03-17 11:46:18下载
    积分:1
  • config
    config.c file from win2000 event log sources.
    2013-10-13 02:27:37下载
    积分:1
  • pigdjas67
    说明:  By throwing an exception to indicate the occurrence of an error(By throwing an exception to indicate the occurrence of an erro)
    2018-12-25 13:29:14下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载