CalendarDay d = ((DayRenderEventArgs)e).Day;
TableCell c = ((DayRenderEventArgs)e).Cell;
if
(intPreMonth == 0)
{
intPreMonth = d.Date.Month;
intCurrentMonth = intPreMonth + 1;
if
(intCurrentMonth > 12)
intCurrentMonth = 1;
intNextMonth = intCurrentMonth + 1;
if
(intNextMonth > 12)
intNextMonth = 1;
arrPreDays = getArrayDay(d.Date.Year, intPreMonth);
arrCurrentDays = getArrayDay(d.Date.Year, intCurrentMonth);
arrNextDays = getArrayDay(d.Date.Year, intNextMonth);
}
int
j = 0;
if
(d.Date.Month.Equals(intPreMonth))
{
while
(!arrPreDays[j].Equals(0))
{
if
(d.Date.Day.Equals(arrPreDays[j]))
{
c.Controls.Clear();
c.Controls.Add(
new
LiteralControl(
"<a href="
day.aspx?year=
" rel="
external nofollow
" rel="
external nofollow
" rel="
external nofollow
" rel="
external nofollow
" rel="
external nofollow
" rel="
external nofollow
" mce_href="
day.aspx?year=
" rel="
external nofollow
" rel="
external nofollow
" rel="
external nofollow
" rel="
external nofollow
" rel="
external nofollow
" rel="
external nofollow
" "
+ d.Date.Year +
"&month="
+
d.Date.Month +
"&day="
+ d.Date.Day +
">"
+ d.Date.Day +
"</a>"
));
}
j++;
}
}
else
if
(d.Date.Month.Equals(intCurrentMonth))
{
while
(!arrCurrentDays[j].Equals(0))
{
if
(d.Date.Day.Equals(arrCurrentDays[j]))
{
c.Controls.Clear();
c.Controls.Add(
new
LiteralControl(
"<a href="
day.aspx?year=
" rel="
external nofollow
" rel="
external nofollow
" rel="
external nofollow
" rel="
external nofollow
" rel="
external nofollow
" rel="
external nofollow
" mce_href="
day.aspx?year=
" rel="
external nofollow
" rel="
external nofollow
" rel="
external nofollow
" rel="
external nofollow
" rel="
external nofollow
" rel="
external nofollow
" "
+ d.Date.Year +
"&month="
+
d.Date.Month +
"&day="
+ d.Date.Day +
" title=查看"
+d.Date.Day+
"日日志>"
+ d.Date.Day +
"</a>"
));
}
j++;
}
}
else
if
(d.Date.Month.Equals(intNextMonth))
{
while
(!arrNextDays[j].Equals(0))
{
if
(d.Date.Day.Equals(arrNextDays[j]))
{
c.Controls.Clear();
c.Controls.Add(
new
LiteralControl(
"<a href="
day.aspx?year=
" rel="
external nofollow
" rel="
external nofollow
" rel="
external nofollow
" rel="
external nofollow
" rel="
external nofollow
" rel="
external nofollow
" mce_href="
day.aspx?year=
" rel="
external nofollow
" rel="
external nofollow
" rel="
external nofollow
" rel="
external nofollow
" rel="
external nofollow
" rel="
external nofollow
" "
+ d.Date.Year +
"&month="
+
d.Date.Month +
"&day="
+ d.Date.Day +
">"
+ d.Date.Day +
"</a>"
));
}
j++;
}