Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
150
How To pass data to the AddAppointment page. Please advise approach.
posted

Dear Readers:

 I would like some advice.   The company I work for has decided that the Infragistics WebSchedule control should be used in an application, but the company's  requirements require customizing of that AddAppointment page.

What the company wants customized is two things:  When making an appointment, (a) the user has to select from a combo an Approval Manager to actuall approve the appointment for appointment to go into affect, and (b) if the appointment is within the next two weeks, to deny making an appointment entirely UNLESS a manager has unfrozen the date as being still open for more appointments.

The concern I have in writing this post is to ask advice as to what would be the best way to pass data from the Web ... View control (WebMonthView, WebWeekView, or WebDayView - likely all will be available to the user to select from) to that AddAppointment page.   The data that has to go to that AddAppointment page is (a) a list of dates in the next two weeks when an appointment could still be allowed, and (b) a list of approval managers (ManagerIDs, and ManagerNames) that would then be displayed in a combo box or list box from which the Users can then select one or more approval managers.

I program some in JavaScript but JavaScript is not my strong suit.   I figure, if I were to pass this data to the AddAppointment page by query string, then I would have to customize the WebMonthView, WebWeekView, and WebDayView to actually construct that query string and pass it on to the AddAppointment page.   Customizing these 3 Infragistics controls may be the way to go, but I am not that certain that it would be wise to have to alter those controls, if that customization could be avoidee.   Another way of making this data available to the AddAppointment page would be to create a couple of Cookies (not my favorites) within the ASP.Net primary pages, and then have the AddAppointment page read those cookies (2 - one for dates, and a second for the Managers list) and then use that data for creating the combo and to decide whether or not the selected date could be scheduled at all.

Which way should I go to pass data from the Web...View controls to the AddAppontment page?   Do I customize the controls (if I can do that) to pass the data up by query string, or do I have the AddAppointment page read cookies?   Or is there some other way to get data to this AddAppointment dialogue box?

Please advise.   Which way should I go to get this data available for use by the AddAppointment page?

 Sincerely,

 Burton G. Wilkins.

 

 

  • 654
    posted

    I'm in a similar situation, trying to find the best approach.  I'm playing with an option now that seems to work well.

    You could always recreate the whole Appointment form, but in my experience this is difficult to tie into all the existing workflow (events, recurrences, reminders, etc.).  So the approach I took was keep the existing form, but enhance it.  Make sure you follow their guidelines for that (links are in other forum posts).  My solution added a WARP control on the AddAppointment page, and on page load I used javascript to trigger a WARP postback (async).  That postback then gets the data I need from the server for this appointment.  When the user saves the custom data, I use the FieldValues to send the selections back to the parent page (other posts discuss this too).  The parent page then grabs the field values and saves them in hidden form fields for update on the server.

    One complication I found was forcing the dialog to understand when one of my custom fields was changed.  If the user didn't change a field that Infragistics knows about, an update never happened.  I had to add code in the ig_addAppointmentDialog.js (saveAndClose function) to make the script understand if one of my fields changed.  If they did, I force an update.  This is similar to the ig_WebScheduleInfo.prototype._dialogClosed function in ig_webscheduleinfo.js.

    I hope this makes sense and adds some value!