Wrox Programmer Forums
|
BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6
This is the forum to discuss the Wrox book ASP.NET 2.0 Instant Results by Imar Spaanjaars, Paul Wilton, Shawn Livermore; ISBN: 9780471749516
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 24th, 2008, 02:55 AM
Registered User
 
Join Date: Mar 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default cancel appointment

how can i add a function for users to view their and to cancel their appointments made. i need some guide

 
Old March 24th, 2008, 03:47 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi jeanhl,

Appointments are saved in the database with the UserName from the MembershipUser. This makes it easy to get appointments for a specific user. Here's what I would do:

1. Create a My Profile page that requires users to log on.

2. On this page, display all appointments for the user (in a GridView for example), by writing code similar to GetAppointmentList in the AppointmentManager class. Instead of a date, pass in the user name.

3. Disable the delete button for past appointments.

4. Write code that reacts to the Delete button and deletes the requested appointment for the user. As an additional layer of security, you should pass the UserName to the database as well so users can only delete their own appointments.

Hope this helps,


Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
Want to be my colleague? Then check out this post.
 
Old March 25th, 2008, 03:45 AM
Registered User
 
Join Date: Mar 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

then need to modify sprocAppointmentSelectList?i don't have any idea how to do it

 
Old March 25th, 2008, 03:55 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

You can modify the existing procedure, or create a new one like

SELECT Col1, Col2 FROM Appointment WHERE UserName = @userName

Replace Col1 and Col2 with the columns you need in your objects.

As I said in another reply: you may need to get a Beginners book first. The Instant Results book is for intermediate developers and assumes prior knowledge on ASP.NET and working with database. You'll have a hard time modifying the application without this knowledge.

I can help you work out general design ideas and extensions for the applications discussed in the book, but I won't write the code for you.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
Want to be my colleague? Then check out this post.





Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I cancel deleting ? ALGNET ADO.NET 1 March 22nd, 2006 01:55 PM
how about cancel a process kevsboy Beginning VB 6 0 February 12th, 2006 11:03 PM
Help me ! Cancel Update Error ! minhtri Pro VB Databases 0 August 28th, 2004 09:03 PM
Cancel a keystroke Kenny Alligood Access 4 June 12th, 2003 10:02 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.