Beruflich Dokumente
Kultur Dokumente
AppointmentsInserted, AddressOf
schedulerStorage1_AppointmentsInserted
AddHandler schedulerStorage1.AppointmentsChanged, AddressOf
schedulerStorage1_AppointmentsChanged
AddHandler schedulerStorage1.AppointmentsDeleted, AddressOf
schedulerStorage1_AppointmentsDeleted
CommitTask()
schedulerStorage1.SetAppointmentId((CType(e.Objects(0), Appointment)),
id)
End Sub
Private Sub CommitTask()
appointmentsTableAdapter.Update(gantTestDataSet)
Me.gantTestDataSet.AcceptChanges()
End Sub
schedulerStorage1.Appointments.CommitIdToDataSource = False
AddHandler appointmentsTableAdapter.Adapter.RowUpdated, AddressOf
appointmentsTableAdapter_RowUpdated
Private id As Integer = 0
Private Sub appointmentsTableAdapter_RowUpdated(ByVal sender As Object,
ByVal e As SqlRowUpdatedEventArgs)
If e.Status = UpdateStatus.Continue AndAlso e.StatementType =
StatementType.Insert Then
id = 0
Using cmd As New SqlCommand("SELECT @@IDENTITY",
appointmentsTableAdapter.Connection)
id = Convert.ToInt32(cmd.ExecuteScalar())
e.Row("UniqueId") = id
End Using
End If
End Sub
schedulerControl1.ActiveViewType = SchedulerViewType.Gantt
schedulerControl1.GroupType = SchedulerGroupType.Resource
schedulerControl1.GanttView.CellsAutoHeightOptions.Enabled = True
' Hide unnecessary visual elements.
schedulerControl1.GanttView.ShowResourceHeaders = False
schedulerControl1.GanttView.NavigationButtonVisibility =
NavigationButtonVisibility.Never
' Disable user sorting in the Resource Tree (clicking the column will not
change the sort order).
colDescription.OptionsColumn.AllowSort = False