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

  • arrangen-node-tree
    用vc实现的二叉树的层次排列输入一颗树输出以层次排列的节点(Hierarchical arrangement of binary trees implemented by vc input a tree output node arranged in hierarchy)
    2018-10-12 08:01:25下载
    积分:1
  • Hosts文件管理工具源码下载
    Hosts文件管理工具源码下载
    2013-10-14下载
    积分:1
  • jiaotong
    简易的全国交通管理查询系统,包括列车查询系统和航班查询系统。它有查询城市,查询车次,查询航班等功能。(Simple national traffic management query system, including the train inquiry system and flight inquiry system. It has the query city, query trips, check flight.)
    2013-05-17 15:55:54下载
    积分:1
  • hsad
    说明:  利用DevC++写的Windows基本控件的类库,有详细的使用例子,水平有限,希望指正(Use DevC to write the Windows basic control class library, have detailed use example, the level is limited, want to point to correct)
    2018-12-30 20:31:07下载
    积分:1
  • WMIDemo
    WMI查询操作是学习wmi不错的例子,还是值得推荐的(WMI query is learning wmi good example is worthy of recommendation)
    2014-01-03 22:10:53下载
    积分:1
  • secondwatch2
    毫秒计时程序(millisecond time procedure)
    2005-01-15 21:00:37下载
    积分:1
  • Windows驱动开发技术详解 源码
    Windows驱动开发技术详解 源码
    2017-10-21下载
    积分:1
  • 异步串口类
    高性能串口异步通信类。
    2013-06-25下载
    积分:1
  • C#+access学生成绩管理完整版
    C# access学生成绩管理系统完整版,在上一期的基础上增加了一些功能,例如增加了学生端和管理员端,学生端只能对自己的信息进行修改和查看,管理员可以对全部学生的信息进行增删改查。
    2019-12-20下载
    积分:1
  • C# 实现定时关机实例源码
    C# 实现定时关机实例
    2013-01-18下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载