posted @ 2007-07-03 11:01
文章分类 - C#.NET
摘要:using System;using System.Collections;using System.Text;namespace myWorkFlow.kernel{ //边表结点类 public class EdgeNode { public int adjvex; public EdgeNode next; public EdgeNode() { next=null; } } ...
阅读全文
摘要:public enum DateInterval{ Second, Minute, Hour, Day, Week, Month, Quarter, Year}public sealed class DateTimeManger{ private DateTimeManger() {}//end of default constructor public static l...
阅读全文
posted @ 2006-11-16 15:21
摘要:private double DateDiff(string howtocompare, System.DateTime startDate, System.DateTime endDate) { double diff=0; System.TimeSpan TS = new System.TimeSpan(endDate.Ticks-startDate.Ticks); swit...
阅读全文
posted @ 2006-11-16 15:18
摘要://当天与该周星期一相差的天数 private int getModdayNum(System.DayOfWeek dw) { int weeknow = Convert.ToInt32(dw); int moddayNum = (-1) * weeknow+1; return moddayNum; } //当天与该周星期日相差的天数 private int getSu...
阅读全文
posted @ 2006-11-15 15:39
摘要:对于每周的星期几, 通常是 “星期X” 的方式, 而在 .NET 中 DayOfWeek 输出的是一个英文形式的 enum.需要自己输出中文时就需要一个转换,如下: public static string WeekDayOfCN(DateTime dt) { string[ ] arrCnNames = new string[ ]{ "日", "一", "二", "三...
阅读全文
posted @ 2006-05-19 09:51
摘要:1、DateTime 数字型 System.DateTime currentTime=new System.DateTime(); 1.1 取当前年月日时分秒 currentTime=System.DateTime.Now; 1.2 取当前年 int 年=currentTime.Year; 1.3 取当前月 int 月=currentTime.Month; 1.4 取当前日 int 日=curre...
阅读全文
posted @ 2006-05-09 10:41
摘要:ado 的 OleDbConnection Myconn = new OleDbConnection(ConfigurationSettings.AppSettings["sql_olap"]);OleDbCommand Mycommand = Myconn.CreateCommand();Myconn.Open();string nUserCount="";string strMdx = "...
阅读全文
posted @ 2006-04-07 14:47
浙公网安备 33010602011771号