慕白兄等各位大哥,帮我看看吧。。。(calendar应用)
private void showInfo(CalendarDay d, TableCell c)
{
DateTime FDate = new DateTime();
string Subject;
SqlCommand objcommand = new SqlCommand();
SqlDataReader objdatareader;
DateTime Date = new DateTime();
Date = d.Date;
ScheduleDA scheduleDadaAccess = new ScheduleDA();
objcommand = scheduleDadaAccess.SchRead(Convert.ToInt16(133), Date);
objcommand.Connection.Open();
objdatareader = objcommand.ExecuteReader();
try
{
while (objdatareader.Read())
{
int ID = Int32.Parse(objdatareader.GetInt32(1).ToString());
FDate = DateTime.Parse(objdatareader.GetSqlDateTime(2).ToString());
string FDate_hour = FDate.Hour.ToString();
string FDate_Minute = FDate.Minute.ToString();
if (FDate_Minute == "0 ")
{
FDate_Minute = "00 ";
}
Subject = objdatareader.GetValue(0).ToString();
if (Subject.Length > 4)
{
Su