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

  • SGOS
    SGOS系统类似的源码,供大家学习参考。(SGOS system source code for all to learn reference.)
    2011-10-22 02:38:05下载
    积分:1
  • dmyectiotwo
    W2kPrintDrvSample Feature Support two page directio
    2017-05-11 12:50:38下载
    积分:1
  • GraphTest
    国外源码,分布状况图,很经典,值得学习。(Foreign source, distribution maps, a very classic, worth learning.)
    2009-12-10 15:59:09下载
    积分:1
  • DeviceVolumeMonitor
    trap windows message using .net framework in c#
    2009-10-19 03:25:16下载
    积分:1
  • YFDH
    用MFC制作的windows程序,,希望大家能提出宝贵的建议,可以(The windows procedure that uses MFC to make, hope everybody can put forward valuable suggestion, can)
    2018-12-31 15:04:21下载
    积分:1
  • ID卡识别实例 c#版
    ID卡识别实例
    2013-01-31下载
    积分:1
  • AystemwV10
    HLPDK V10,0+ System Extension Library,(HLPDK V10, 0 + System Extension Library,)
    2017-08-19 20:30:55下载
    积分:1
  • c#考试 源码下载
    c#考试系统 源码下载
    2017-05-31下载
    积分:1
  • ICON
    ICON图标提取工具,可以提取exe以及dll文件程序的所有icon图标。(ICON icon extraction tool to extract the program exe and dll files for all icon icon.)
    2011-05-11 11:25:44下载
    积分:1
  • c++ 进查看工具 能查看 所有进句柄以及详细信息
    c++ 进程查看工具 能查看 所有进程句柄以及详细信息
    2013-09-18下载
    积分:1
  • 696516资源总数
  • 106442会员总数
  • 11今日下载