PDA

View Full Version : Save data from user defined panel to custom table



Ditte
24-Aug-2009, 11:24 AM
Hi,

the user should have a way to change some value in a timeline view.


Procedure start_edit_event tdEvent ByRef tEvent
Integer iviewtype
Integer iHitCode
Variant vViewEvent vViewEventaktuell
Variant vEvent
Handle hoKal_mask
Handle hoViewEvent

Move (NullComObject()) to vViewEvent
//OLECalendarViewType
//DayView=0;WorkWeekView=1;WeekView=2;MonthView=3;Fu llWeekView=4;TimeLineView=5
Get ComViewType of ghoSigCj_Calendar to iviewtype //
If (iviewtype eq 5) Begin
Send GetHitCode to ghoSigCj_Calendar (&vViewEvent) (&iHitCode)
If (not(IsNullComObject(vViewEvent)) Begin
Get Create U_cSigCjComCalendarViewEvent to hoViewEvent
Set pvComObject of hoViewEvent to vViewEvent
Get ComEvent of hoViewEvent to vEvent
Send Destroy of hoViewEvent
Get Move_Event_Object_Data_To_tdEvent of ghoSigCj_Calendar vEvent to tEvent
End
End
End_Procedure
I read my table data and fill my modalpanel. If the user has make changes I like to save it back to the database.

I found no way to get the current event from calendar.
There is a way to save the tevent.iURN and search in the database, change it an refresh the calendar.
Is there a better way to get the actual event and use a procedure of the sig pkg for this?

Ditte
27-Aug-2009, 02:27 AM
Sorry for this question,

at the same way of course.