{          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 279
下载积分: 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# 模拟按键 功能完整源码下载
    可以说是个简易版的按键精灵。主要功能有:自动输入,截屏,控制鼠标移动点击。
    2013-08-28下载
    积分:1
  • xdrj
    易语言写的杀毒软件...............(Easy language to write anti-virus software ...............)
    2009-12-13 12:00:05下载
    积分:1
  • INQIM2
    说明:  
    2018-02-15 15:14:28下载
    积分:1
  • bkrks
    一个网络开发包NDK,其中有使用sdk的例子()
    2018-06-13 12:09:09下载
    积分:1
  • TimeLimit
    VC 开发 限定程序的使用时限!您在编共享类软件时是不是想要一个限时代码呢,请看本文!(VC program development limit the use of the time limit! In the category of your sharing software is not like a time-limited code does, see this article!)
    2008-12-21 21:24:08下载
    积分:1
  • jigh_matlhb_com
    VC具有高效率的优点,通过com接口将VC和matlab进行连接(VC has the advantages of high efficiency, through the com interface will connect VC and matlab)
    2017-07-22 04:38:08下载
    积分:1
  • UDF
    FLUENT中的源项UDF,初学UDF可以下载下来学学。(this is a source UDF,IF you want it you can download .thank you! )
    2020-12-05 15:39:22下载
    积分:1
  • ilto__interested
    tcpDog ,闻入其名,对tcp 感兴趣的狗狗,祝大家狗年进步(TcpDog, smell into its, interested in TCP dog, I wish you all the year of the dog)
    2017-06-02 09:21:31下载
    积分:1
  • BaseKeyDemo
    基本键盘操作的vc程序源码,感兴趣的可以看看,推荐!!!(Basic keyboard operation vc program source code, can be of interest to see, recommended! ! !)
    2011-09-21 22:20:11下载
    积分:1
  • C#邮件群发器源码
    C#邮件群发器源码
    2013-10-31下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载