.NET Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgramming.NET Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
  #1  
Old October 21st, 2003, 07:57 AM
playboy playboy is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 3 playboy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
priority editing (c# + sql)

whats the reccomended method for editing the priority of data. for example a movie rental site. a user adds 5 movies, and wishes to reorder the order in which they will be sent.

so far i have only managed to make it work one way, and thats changing the priorty to soemthing higher, but lower makes it skip a row.

if you would please just give me a clear enough direction to work on, would be greatly appreciated,

stevan

Reply With Quote
  #2  
Old October 21st, 2003, 12:38 PM
rdoekes rdoekes is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: Strasbourg, France
Posts: 181 rdoekes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 m 20 sec
Reputation Power: 6
Send a message via AIM to rdoekes Send a message via Yahoo to rdoekes
Dear Stevan,

I could be just daft, but you are clear as mud to me. Could you explain your requirement a little better.
__________________
- Rogier Doekes

Reply With Quote
  #3  
Old October 23rd, 2003, 09:06 AM
playboy playboy is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 3 playboy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
ok, i apologise for being unclear.

basically. Say you are developing a dvd rental website. you make it so that your users add a movie to be dispatched to them, in the order that they click the movies to be added. so for example, a user views the movie listing and chooses to add 3 movies to their list of rented movies.. the added movies will be added in order starting from the first clicked being the highest priority (1) to the last being clicked having the lowest priority (3).

Now, say a user wishes to change the priority, so for example the last added movie which has third priority a user wishes to higher its priority to first, or second. Likewise a user may wish to lower a priority of a movie.

I have had some luck in achieving this, however i have only managed to get as far as changing the priority successfuly to something higher, not lower though.

I hope this time i am a little clearer.

Thank you,

stevan

Reply With Quote
  #4  
Old October 23rd, 2003, 10:29 AM
rdoekes rdoekes is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: Strasbourg, France
Posts: 181 rdoekes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 m 20 sec
Reputation Power: 6
Send a message via AIM to rdoekes Send a message via Yahoo to rdoekes
could you send a code sample of how you managed to upgrade the priority of an item?

we'll take that as a starting point

Reply With Quote
  #5  
Old October 23rd, 2003, 03:38 PM
playboy playboy is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 3 playboy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
i unfortunately don't have the code here, it is at work and i am at home.

I can't remember enough of the code to actually explain in detail what it does, overall i think there may be a better way of doing it, at the moment my colleague made it so it incremented the priority +1 to move up when raising the priority, but when doing the opposite (-1) it skipped a row.

How would you go about putting in a priority organisation function? we are using SQL btw.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgramming.NET Development > priority editing (c# + sql)


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway