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

  • BMPconvertTXT
    本程序通过 c++ 工具进行对BMP图像显示,转换为TXT格式并进行存储,适合于开发系统C++的研究者!(This procedure through the c++ tool for the BMP image display, converted to TXT format and storage, suitable for the development of system C++ researchers!)
    2017-05-14 10:37:27下载
    积分:1
  • 读取WebBrowser中的Cookies(含Session)信息 并赋值给HttpWebRequest 执行模拟网页操作
    通常大家通过 webbrowser.document.cookies 只能得到cookie但是得不到 session,这个实例也得到了session
    2013-01-05下载
    积分:1
  • C#实现挂机锁,挂机 参考 实例源码
    挂机时锁定可以参考这个实例
    2013-01-19下载
    积分:1
  • 79952340
    一种OFDMA低复杂度的比例资源分配策略仿真程序,C语言编程的()
    2018-04-20 15:50:02下载
    积分:1
  • 分贝显示器,实时显示声音强度 源码下载
    分贝显示器,实时显示声音强度 源码下载
    2013-12-14下载
    积分:1
  • Pass
    关于TP对KdDisableDebugger双机限制的解决代码。(TP limit of KdDisableDebugger double machine to solve the code.)
    2013-04-02 10:28:37下载
    积分:1
  • C# 启动/停止 iis 网站 例子源码(iis 6.0下测试通过)
    C# 启动/停止 iis 网站 例子源码(iis 6.0下测试通过)
    2013-09-08下载
    积分:1
  • RELEASEPDLL
    将dll文件加入文件资源之后调用函数释放,实现了将dll文件打包(Dll files will be added to the file after the call function to release resources to achieve the dll file is packaged)
    2013-09-12 21:02:42下载
    积分:1
  • Win32Application
    VC++获取到Windows开机运行的时间,不是开机时间,而是从开机后到现在的运行时间,也就是一次开机所运行的时间,如果关机了,可能就不准确了。(The VC++ get to the Windows boot running time is not boot time, but from the boot to the running time, which is the time you turn on the running time, shutdown, and may not be accurate.)
    2013-04-24 17:46:46下载
    积分:1
  • Desktop
    自己写的一个小小内存池,,希望可以分享。。里面的main.cpp是使用的例子( To write a small memory pool, and hope to share. . There are examples of the use of main.cpp)
    2014-07-12 21:53:42下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载