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

  • Project5
    针对大型集群存储系统中磁盘SMART信息,对磁盘故障进行预测(failure predict)
    2017-03-29 20:25:36下载
    积分:1
  • MerchandiseData
    库流管理系统 快快下MFC 不错的源码,下来就可以用了。sql server2(Treasury Management System as soon as possible under the MFC a good source, it can be used. sql server2)
    2008-05-07 12:10:46下载
    积分:1
  • MTK platform for DW9714 驱动
    MTK platform for DW9714 驱动(MTK platform for DW9714 Driver)
    2021-01-17 03:38:44下载
    积分:1
  • arp
    在windows平台下的一个ARP程序,有些安装VC++软件不完整的可能不包含部分同文件,Iphlpapi.h可以下载后放进include文件夹下面即可,通过程序帮助理解协议的本身(In a windows platform ARP procedures, and some installation VC++ Incomplete software may not contain some of the same document, Iphlpapi.h can be downloaded into the folder include the following can, through the procedure to help understand the agreement itself)
    2008-04-15 09:08:34下载
    积分:1
  • 一个读取硬盘序列号与CPU序列号的DLL
    VC写的,一个读取硬盘序列号与CPU序列号的DLL,大家可以利用它来为自己的软件提供保护机制。(VC written by a reader drives and CPU serial number sequence, the DLL, you can use it for its own software to provide protection mechanisms.)
    2005-05-02 16:36:26下载
    积分:1
  • c# 定时开机源码下载
    远程服务器通过局域网来控制开机,要主板支持Lan开机进入CMOS参数设置。选择电源管理设置“Power Management Setup”菜单。将局域网启动置为enable即可;观察发现不同的CMOS的局域网启动名称不同。注意一下关键字即可 LAN XXXXXX Power UP 有这些关键字就可能是。
    2014-01-26下载
    积分:1
  • Regedit
    vc 编辑注册表信息Regedit的程序源码,值得一看!(vc edit the registry Regedit program source code, worth a visit!)
    2011-07-01 22:03:37下载
    积分:1
  • c#考试 源码下载
    c#考试系统 源码下载
    2017-05-31下载
    积分:1
  • Regedit
    C++实现的读写注册表的功能,可以直接读取某个键的值,设定某个键的值和删除某个键的值,非常方便。(Read and write C++ implementation of the registry function, you can directly read the value of a key, set the value of a key to delete a key value, very convenient.)
    2013-10-27 19:41:13下载
    积分:1
  • 通过C#自带的头文件(类)获取Windows信息
    通过C#通过的类获取系统/硬件信息 
    2020-12-10下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载