想用DotNetbar的CalendarView做一个日程表,但是不知道如何进行和数据库的绑定,官网上貌似也没有说明,有人知道吗?
解决方案 »
- VS2010自带打包程序打包 运行遇到问题,每次都要安装
- 谁有direct二维图形编程的资料啊???谢谢
- 我受不了了!我写了个多线程的基于SOCKET的WEB应用,可CPU占用率高达98% !!??有谁来帮我看看谢谢~
- 如何使用C#制作一个精确计时器,计时精度到底毫秒级别或者更高
- 下面的分页代码在后台没有相关的代码,所以也跳转不了,我该怎么办?我用的是DataList 控件
- vs2010 dllimport调用dll的问题
- 关于接口
- 请教是什么是
- 一个超简单的问题,望大虾不吝赐教!
- C#使用chart控件画折线图
- treeview如何在选中子节点时获取所有上级节点的名字
- 模拟请求页面,返回的cookie 为空,为什么!
/// <summary>
/// Adds the specified appointment to the model
/// </summary>
/// <param name="subject">Appointment subject</param>
/// <param name="startTime">Appointment start time</param>
/// <param name="endTime">Appointment end time</param>
/// <param name="color">Appointment color</param>
/// <param name="er">Appointment er</param>
private Appointment AddAppointment(string subject, string description, string address, DateTime startTime, DateTime endTime, string color, string er, string tag,string RemindTime)
{
Appointment appointment = new Appointment();
appointment.StartTime = startTime;
appointment.EndTime = endTime;
appointment.Subject = subject;
appointment.Description = description;
appointment.OwnerKey = address;
appointment.CategoryColor = color;
appointment.TimeMarkedAs = er;
appointment.Tooltip = description;
appointment.Tag = tag;
appointment.Recurrence = new AppointmentRecurrence();
if (RemindTime.Trim() != "")
{
appointment.Reminders.Add(new Reminder(Convert.ToDateTime(RemindTime)));
}
appointment.StartTimeAction = eStartTimeAction.StartTimeReachedEvent;
appointment.StartTimeReached += new EventHandler(appointment_StartTimeReached);
// Set recurrence type to weekly
appointment.Recurrence.RecurrenceType = eRecurrencePatternType.Daily;
appointment.Recurrence.Daily.RepeatOnDaysOfWeek = eDailyRecurrenceRepeat.All;
appointment.Recurrence.Daily.RepeatInterval = 10;
appointment.Recurrence.RangeLimitType = eRecurrenceRangeLimitType.RangeEndDate;
//--------------------
SchedulecalendarView.CalendarModel.Appointments.Add(appointment);
return (appointment);
} void appointment_StartTimeReached(object sender, EventArgs e)
{
/* TipForm tf = new TipForm();
tf.Show();*/
}
private void SchedulecalendarView_AppointmentReminder(object sender, DevComponents.Schedule.Model.ReminderEventArgs e)
{
if (e.Reminder.Appointment != null)
{
DateTime dt = e.Reminder.Appointment.Reminders[0].ReminderTime;
if (dt.Year == System.DateTime.Now.Year && dt.Month == System.DateTime.Now.Month && dt.Day == System.DateTime.Now.Day && dt.Hour == System.DateTime.Now.Hour && dt.Minute == System.DateTime.Now.Minute)
{
TipForm tf = new TipForm(e.Reminder.Appointment.Subject, e.Reminder.Appointment.Description);
tf.Show();
}
}
}
#endregion