search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Using Callback to update DB records

Asked by sanson
15 years ago.

I'm using the lastest trial software. I downloaded it today. Im trying to do a update of an appointment record.

I have followed the instructions on the website about calling the eventMove handler. The calendar doesnt update. I can even make a msgbox("hello") appear on event from callback.

Protected Sub DayPilotCalendar1_EventMove(ByVal sender As Object, ByVal e As DayPilot.Web.Ui.Events.EventMoveEventArgs) 
Dim appointmentAdapter As New OhperaBusinessLogicTableAdapters.tblAppointmentsTableAdapter 
'dim variables 
Dim uidApp As Guid
Dim dtmStart, dtmEnd, dtmAppDate As Date
Dim strDetails As String

uidApp = ConvertStringToGUID(e.Value)
dtmStart = e.NewStart
dtmEnd = e.NewEnd
dtmAppDate = e.NewStart
strDetails = e.Text

appointmentAdapter.Update(uidApp, dtmAppDate, strDetails, dtmStart, dtmEnd)
DayPilotCalendar1.DataBind() 
DayPilotCalendar1.Update()


End Sub
html:
<DayPilot:DayPilotCalendar 
ID="DayPilotCalendar1"
runat="server"
BackColor="#FFFFD5"
BorderColor="#000000"
CellSelectColor="#316AC5"
DataEndField="dtmEnd"
DataSourceID="ObjectDataSource1"
DataStartField="dtmStart"
DataTextField="strShortDetails"
DataValueField="uidAppointment"
Days="7"
DurationBarColor="Blue"
StartDate="2007-09-21"
EventMoveHandling = "PostBack"

>

</DayPilot:DayPilotCalendar>
Answer posted by Dan Letecky
15 years ago.
VB.NET is not my primary language buIt seems that you are missing

Handles DayPilotCalendar1.EventMove

in

Protected Sub DayPilotCalendar1_EventMove(ByVal sender As Object, ByVal e As DayPilot.Web.Ui.Events.EventMoveEventArgs) Handles DayPilotCalendar1.EventMove

Let me know if that helped.
Comment posted by sanson
15 years ago.
Thanks Dan that really helped i cant believe that i was stuck on something so simple for so long.
This question is more than 3 months old and has been closed. Please create a new question if you have anything to add.