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

  • C# QQ空间登录代码下载
    QQ空间登录代码,提供的是一个思路,测试了下 能获取验证码,但是总提示验证码失败
    2015-05-10下载
    积分:1
  • DumpEC
    使用WinIO访问笔记本EC的所有寄存器和存储空间。本程序适用ENE EC KB3926(EC laptop using WinIO access to all registers and storage space. This procedure applies to ENE EC KB3926)
    2021-01-14 20:58:47下载
    积分:1
  • c++ 通过dao 读写 access文件 实例源码下载
    c++ 通过dao 读写 access文件 实例源码下载
    2015-03-16下载
    积分:1
  • code2
    一个c下的 虚拟存储管理器的页面调度程序供学习交流(C under a virtual memory manager pages for schedulers learn)
    2009-06-27 22:45:07下载
    积分:1
  • winform 登陆,修改简单功能实现,带数据库
    winform 登陆,修改简单功能实现,带数据库
    2015-06-25下载
    积分:1
  • idoq
    名称:制作托盘程序 编译环境:vc++,net2003(Name: make pallet program compile environment: vc, net2003)
    2018-12-30 23:30:19下载
    积分:1
  • jcaj
    vc 检测键盘按键 的程序源码,感兴趣的可以看看(vc test program source code of keyboard keys, can be of interest to see)
    2011-09-08 22:09:43下载
    积分:1
  • MSIIVP
    简单的聊天系统,本程序是使用vc进行编程的,可以学习的()
    2018-04-10 14:59:50下载
    积分:1
  • ceing
    一个直接写屏的模拟电影字幕的效果的测试程序,可以给你的程序带来很漂亮的效果1(A direct write screen simulation film subtitle effect test program, can give your program to bring a very beautiful effect 1)
    2018-09-30 06:21:39下载
    积分:1
  • util
    几个通用过程,包括内存拷贝,移动和其他操作的例子(Several generic process, including the memory copy, mobile and other operations example)
    2003-09-07 12:27:55下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载