{          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 202
下载积分: 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#设置键盘热键,键盘钩子实例源码
    键盘钩子 C#版本的常用入门级实例
    2013-01-19下载
    积分:1
  • AddressListVS05
    该系统为通讯录系统,实现了通讯录的管理功能,增删改通讯功能。通讯录查询工作是一个很复杂的问题,在实际的工作领域中,时常会遇到要修改通讯录的问题,例如修改、删除、添加、查找等都是应用过程中十分频繁的操作,如果有一个应用软件可以使这个操作简单而富有人性化,我们就可以通过界面上的提示语言来轻松准确地完成以上操作了。 本通讯录主要涉及函数的调用、指针、哈希表等主要技术。其中,函数的调用和哈希表是技术的重点。 (The system address book system, and the address book management features, additions and deletions to communication. Directory inquiries is a very complex issue, in the actual work areas, often face the problem to modify the address book, such as modify, delete, add, find the application process are all very frequent operation, if an application can make this simple and full of humane, we are prompted by the interface language to easily and accurately complete the above operation. The book mainly related function call, pointer, hash table and other major technologies. Among them, the function call and a hash table is the focus of technology.)
    2011-06-05 13:03:11下载
    积分:1
  • 6416198
    Similar to VB property sheet controls(Similar to the VB property sheet controls)
    2017-07-19 01:30:36下载
    积分:1
  • DeviceVolumeMonitor
    trap windows message using .net framework in c#
    2009-10-19 03:25:16下载
    积分:1
  • C#邮件群发器源码
    C#邮件群发器源码
    2013-10-31下载
    积分:1
  • VC_ini_1
    一个的读写INI文件的类及实例(INI file reading and writing a class and examples of)
    2004-06-02 15:59:09下载
    积分:1
  • redistry
    对系统注册表的操作,及用相应的实现码进行编程。(The operation of the system registry, and with the realization of the corresponding programming code.)
    2016-05-07 21:18:42下载
    积分:1
  • C# 32路继电器控制源码
    C# 32路继电器控制源码
    2019-10-22下载
    积分:1
  • 01825465
    COM+编程技术内幕 学习COM+的好资料,不错的源码(COM+ programming technology insider good information to learn COM+, good source)
    2017-06-01 00:07:24下载
    积分:1
  • PE-digital-signature-
    提取PE文件的数字签名,还可以写入数字签名(PE files extracted digital signature, digital signature can also be written)
    2011-05-01 20:45:18下载
    积分:1
  • 696518资源总数
  • 105885会员总数
  • 31今日下载