Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 24th, 2008, 02:55 AM
Registered User
 
Join Date: Mar 2008
Location: , , .
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

  #2 (permalink)  
Old March 24th, 2008, 03:47 AM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 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.
  #3 (permalink)  
Old March 25th, 2008, 03:45 AM
Registered User
 
Join Date: Mar 2008
Location: , , .
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

  #4 (permalink)  
Old March 25th, 2008, 03:55 AM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 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.
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 11:47 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.