Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/285.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/.net/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 在调度程序上删除数据_C#_.net_Devexpress - Fatal编程技术网

C# 在调度程序上删除数据

C# 在调度程序上删除数据,c#,.net,devexpress,C#,.net,Devexpress,iam使用带有拖放操作的DevXPress XtraSchedulercontrol。我使用列表作为数据源,如果我想创建一个新的约会,可以从Gridcontrol拖放一个约会。到目前为止还不错 如果有人取消约会,我如何检查权限?我知道AppointDrop事件,并对其进行处理,以便删除的约会不在我的数据源中。但是schedulercontrol显示了约会。我能行 Storage.RefreshData() 但是没有办法。我只是不想显示约会。 关键是,任何人都不能在周日或节假日等时间预约。 如果

iam使用带有拖放操作的DevXPress XtraSchedulercontrol。我使用列表作为数据源,如果我想创建一个新的约会,可以从Gridcontrol拖放一个约会。到目前为止还不错

如果有人取消约会,我如何检查权限?我知道AppointDrop事件,并对其进行处理,以便删除的约会不在我的数据源中。但是schedulercontrol显示了约会。我能行

Storage.RefreshData()
但是没有办法。我只是不想显示约会。 关键是,任何人都不能在周日或节假日等时间预约。
如果我不将约会加载到数据源中,我无法理解为什么会显示约会。

我找到了正确的解决方案

private void Scheduler_AppointmentDrop(object sender, AppointmentDragEventArgs e)
{
   if (isAllowed)
   {
      MyDataSource.Add(e.EditedAppointment);
   }
}

private void Scheduler_DragDrop(object sender, DragEventArgs e)
{
   SchedulerStorage.RefreshData();
}