上一页 1 ··· 49 50 51 52 53 54 55 56 57 ··· 69 下一页
摘要: Log4net监控服务状态对于比较复杂的逻辑,可以使用log4net来记录程序的执行过程中的关键数据,以此来监控服务的逻辑是否完备。1.在项目中引入log4net.dll组件;2.在App.congfig中做如下修改在<configSections></configSections>加入如下内容:<sectionname="log4net"type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"/>在根结点下加入如下内容:<log4net& 阅读全文
posted @ 2012-08-08 20:42 沐雪架构师 阅读(2888) 评论(1) 推荐(0) 编辑
摘要: public class LogMrg { public static string oldfileName = ""; /// <summary> /// /// </summary> /// <param name="logcontent">日志内容</param> /// <param name="filename">完全路径名(路径+文件名)</param> public static void WriteLog(string logcontent,str 阅读全文
posted @ 2012-08-08 20:42 沐雪架构师 阅读(173) 评论(0) 推荐(0) 编辑
摘要: Asp.net DataTable添加列和行的方法方法一:DataTable tblDatas = new DataTable("Datas");DataColumn dc = null;dc = tblDatas.Columns.Add("ID", Type.GetType("System.Int32"));dc.AutoIncrement = true;//自动增加dc.AutoIncrementSeed = 1;//起始为1dc.AutoIncrementStep = 1;//步长为1dc.AllowDBNull = false 阅读全文
posted @ 2012-08-08 20:40 沐雪架构师 阅读(13809) 评论(0) 推荐(1) 编辑
摘要: using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Diagnostics;using System.ServiceProcess;using System.Text;namespace WinService{ public partial class WinService : ServiceBase { private System.Timers.Timer theTimer = new System.Time... 阅读全文
posted @ 2012-08-08 20:40 沐雪架构师 阅读(145) 评论(0) 推荐(0) 编辑
摘要: 安装,我们要用到这个程序,这个程序位于:.点击开始菜单,选择“运行”,在运行对话框中输入cmd,进入到命令行窗口,输入:进入到这个目录,然后输入后边的内容就是服务可执行程序的路径。单击“开始”,指向“设置”,然后单击“控制面板”。依次单击“性能和维护”、“管理工具”,然后双击“服务”。在里边你应该能够看到我们制作的在这里边,我们可以启动,关闭服务,还可以设置服务的启动类型。在“事件查看器”里,每隔五分钟,WinService服务会写入一条记录。如果你不需要这个服务,可以使用来卸载,比如,也可以使用来卸载。服务的批处理文件:Ø安装服务文件:Ø启动服务文件:Ø停止服务 阅读全文
posted @ 2012-08-08 20:40 沐雪架构师 阅读(287) 评论(0) 推荐(0) 编辑
摘要: 1、 table 每行 鼠标悬停和移出的样式变化:<tr class="line-odd" onmouseover="currentcolor = this.style.backgroundColor;this.style.backgroundColor='#F7FFF7';this.style.cursor='hand';" onmouseout="this.style.backgroundColor = currentcolor;"> <td>二号楼</td> & 阅读全文
posted @ 2012-08-08 20:36 沐雪架构师 阅读(232) 评论(0) 推荐(0) 编辑
摘要: 如何生成静态页:方案1:View Code /// <summary>/// 传入URL返回网页的html代码/// </summary>/// <param name="Url">URL</param>/// <returns></returns>public static string getUrltoHtml(string Url){errorMsg = "";try{System.Net.WebRequest wReq = System.Net.WebRequest.Crea 阅读全文
posted @ 2012-08-08 20:34 沐雪架构师 阅读(390) 评论(0) 推荐(0) 编辑
摘要: 1、 table 每行 鼠标悬停和移出的样式变化:<tr class="line-odd" onmouseover="currentcolor = this.style.backgroundColor;this.style.backgroundColor='#F7FFF7';this.style.cursor='hand';" onmouseout="this.style.backgroundColor = currentcolor;"> <td>二号楼</td> & 阅读全文
posted @ 2012-08-08 20:30 沐雪架构师 阅读(228) 评论(0) 推荐(0) 编辑
摘要: 操作xml格式的字符串,将其节点读取出来的方法一般有2中,第一种直接读取字符串,对字符串进行截取和判断;第二种方法是将字符串加载到C#自带的类XmlDocument里,这样就可以像才做DataTable一样进行操作了。 首先该字符串必须符合xml的规范,如:string xmlStr="<?xml version="1.0" encoding="UTF-8" ?><usermsg><user><uid>2010211</uid><userName>12三3001</u 阅读全文
posted @ 2012-08-08 20:30 沐雪架构师 阅读(4596) 评论(0) 推荐(1) 编辑
摘要: 今天用GridView控件时候,生成表格的内边框老是去除不了..上网查了下,就设置GridLines="None"最好用,哈哈!另外还有Css的解决方案html标签中的bordercolor属性指定表格边框颜色之后,无论是表格的四个边框还是表格内部的单元格边框颜色便都设置好了.但是在asp.net的gridview控件中,设置bordercolor之后,在生成的html代码中是这样表示的:<table class="gridview_m" cellspacing="0" rules="all" border= 阅读全文
posted @ 2012-08-08 20:29 沐雪架构师 阅读(843) 评论(0) 推荐(0) 编辑
上一页 1 ··· 49 50 51 52 53 54 55 56 57 ··· 69 下一页