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

  • ReceiveMessageer
    接收系统消息不示例,可以提供初学者使用.(receive system message demon .using VC++)
    2012-12-09 18:01:17下载
    积分:1
  • VPNDialer
    vpn拨号C源码,找你很久才找到的,不知道能否用,(vpn dailer c source code)
    2010-01-27 17:38:38下载
    积分:1
  • c4
    说明:  用时间片轮法实现进程的调度,该程序比较短和简单(Time piece wheel realize the process of scheduling, the program relatively short and simple)
    2008-03-27 21:57:16下载
    积分:1
  • 在WebBrowser中执行javascript脚本的几种方法整理(execScript/InvokeScript/NavigateScript) 附完整源码
    涵盖了几种常用的 webBrowser执行javascript的方法,详见示例截图以及代码
    2013-03-19下载
    积分:1
  • Calculator
    而as过热和高品位i哦将通过配额将分批doi公平我( U800Cas u8FC7 u70ED u548C u9AD8 u54C1 u4F4Di u54E6 u5C06 u901A u8FC7 u914D u989D u5C06 u5206 u6279doi u5E32 u5E73 u6211)
    2017-05-24 21:07:34下载
    积分:1
  • CanOpen的简单Demo
    【实例简介】
    2021-06-05 00:31:18下载
    积分:1
  • read_harddisk
    在VC++环境下点击按钮读取硬盘序列号并输出显示(In VC++ environment, click the button to read the hard drive serial number and the output display)
    2010-09-07 14:39:47下载
    积分:1
  • ConvDBF
    批量将DBF文件中的数据导入到一个MDB文件中,涉及到数据库操作和VC DLG编程。(Batch data in the DBF file into an MDB file, related to the operation of the database and the VC DLG programming.)
    2013-09-27 20:40:44下载
    积分:1
  • timem_PCM
    G729a library audio coding, coding PCM for g729a, compressible 16 times
    2017-05-22 04:21:00下载
    积分:1
  • Linked-list-version-of--system
    链表版的软件工程师管理系统,可以对工程师的信息进行增删改查(The linked list version of the software engineers, management system that can CRUD information for engineers)
    2012-05-06 21:34:37下载
    积分:1
  • 696518资源总数
  • 106161会员总数
  • 5今日下载