2009年4月21日 星期二

Calendar顯示特定節日



Calendar1_DayRender:

string[,] AllHolidays = new string [13, 32];

AllHolidays[1,1] = "元旦";
AllHolidays[2,8] = "除夕";
AllHolidays[2,9] = "春節";
AllHolidays[4,5] = "清明節";
AllHolidays[5,1] = "勞動節";
AllHolidays[6,11] = "端午節";
AllHolidays[9,19] = "中秋節";
AllHolidays[10,10] = "國慶日";

if (AllHolidays[e.Day.Date.Month, e.Day.Date.Day] != "")
{
e.Cell.Controls.Add(new LiteralControl("
" + AllHolidays[e.Day.Date.Month, e.Day.Date.Day] + ""));
}

轉自 http://itgroup.blueshop.com.tw/inmarkblue/markshu?n=convew&i=6580

沒有留言:

張貼留言