Click here to Skip to main content
15,896,727 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# - How to call database records one-by-one and display it in ListView? Pin
Henry Minute6-Jan-11 14:19
Henry Minute6-Jan-11 14:19 
GeneralRe: C# - How to call database records one-by-one and display it in ListView? Pin
LAPEC6-Jan-11 15:13
LAPEC6-Jan-11 15:13 
GeneralRe: C# - How to call database records one-by-one and display it in ListView? Pin
Henry Minute7-Jan-11 11:16
Henry Minute7-Jan-11 11:16 
GeneralRe: C# - How to call database records one-by-one and display it in ListView? Pin
LAPEC7-Jan-11 13:21
LAPEC7-Jan-11 13:21 
GeneralRe: C# - How to call database records one-by-one and display it in ListView? Pin
LAPEC9-Jan-11 8:37
LAPEC9-Jan-11 8:37 
GeneralRe: C# - How to call database records one-by-one and display it in ListView? Pin
Henry Minute9-Jan-11 8:38
Henry Minute9-Jan-11 8:38 
GeneralRe: C# - How to call database records one-by-one and display it in ListView? Pin
LAPEC9-Jan-11 8:41
LAPEC9-Jan-11 8:41 
GeneralRe: C# - How to call database records one-by-one and display it in ListView? Pin
Henry Minute9-Jan-11 9:10
Henry Minute9-Jan-11 9:10 
Well, as I said the other day I have had two ideas.

1) Add a column to the Food Table and the Drink Table 'QtyInStock' to hold the information. Although as I don't know how you calculate(?) the data for the Status field I can't advise on that at the moment.
2) Implement a Dictionary (or similar Collection) to hold the information and read it in when the application starts and write it out to disk when the app closes.

Both of these will involve quite complex changes to the code.

With 1), to make it work properly you would have to at least do part of what I mentioned a while ago and move the Data access stuff out into a separate project so that you can then be sure that both the StartersUC (and MainsUC and DessertUC etc.) and the Stock-In form are guaranteed to be looking at the same DataSet/DataTable so that when you update the data in Stock-In the UCs get notified and can update their buttons. Similarly when the buttons decrease the number the next time you go to Stock-In it sees the new figures.

With 2) to ensure that all the Forms/UCs etc. that need to are looking at the same collection it would have to be implemented as a Singleton Class. There is also the Serialization and Deserialization to be dealt with.

As I say, both will require substantial changes to the existing code because the application was not designed from the start to allow for this sort of thing. It has sort of just grown little bits to deal with specific problems in isolation, not as a part of the whole application. It is nobody's fault. It is a result of having asked for help about a specific thing, getting a helpful response and coding to that. The problem is that the responders had no idea how their suggestions would impact on the other parts, because they did not know about them.
Henry Minute

Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
I wouldn't let CG touch my Abacus!

GeneralRe: C# - How to call database records one-by-one and display it in ListView? Pin
LAPEC30-Jan-11 4:13
LAPEC30-Jan-11 4:13 
GeneralRe: C# - How to call database records one-by-one and display it in ListView? Pin
Henry Minute10-Feb-11 13:20
Henry Minute10-Feb-11 13:20 
GeneralRe: C# - How to call database records one-by-one and display it in ListView? Pin
LAPEC10-Feb-11 13:41
LAPEC10-Feb-11 13:41 
GeneralRe: C# - How to call database records one-by-one and display it in ListView? Pin
LAPEC10-Feb-11 13:57
LAPEC10-Feb-11 13:57 
GeneralRe: C# - How to call database records one-by-one and display it in ListView? Pin
LAPEC9-Jan-11 8:52
LAPEC9-Jan-11 8:52 
QuestionHelp with UAC Issue Pin
Jammer16-Dec-10 8:15
Jammer16-Dec-10 8:15 
AnswerRe: Help with UAC Issue Pin
Jammer17-Dec-10 9:39
Jammer17-Dec-10 9:39 
Questionset url file Pin
ali_heidari_16-Dec-10 3:24
ali_heidari_16-Dec-10 3:24 
AnswerRe: set url file Pin
Hari Om Prakash Sharma16-Dec-10 3:53
Hari Om Prakash Sharma16-Dec-10 3:53 
QuestionI am read File and I want to get information from each 256 byte and from each 256 byte ? Pin
Honeyboy_2016-Dec-10 2:56
Honeyboy_2016-Dec-10 2:56 
AnswerRe: I am read File and I want to get information from each 256 byte and from each 256 byte ? Pin
Thomas Krojer16-Dec-10 3:03
Thomas Krojer16-Dec-10 3:03 
AnswerRe: I am read File and I want to get information from each 256 byte and from each 256 byte ? Pin
Hari Om Prakash Sharma16-Dec-10 3:19
Hari Om Prakash Sharma16-Dec-10 3:19 
AnswerRe: I am read File and I want to get information from each 256 byte and from each 256 byte ? [modified] Pin
Hari Om Prakash Sharma16-Dec-10 3:36
Hari Om Prakash Sharma16-Dec-10 3:36 
GeneralRe: I am read File and I want to get information from each 256 byte and from each 256 byte ? Pin
Luc Pattyn16-Dec-10 4:17
sitebuilderLuc Pattyn16-Dec-10 4:17 
GeneralRe: I am read File and I want to get information from each 256 byte and from each 256 byte ? Pin
Hari Om Prakash Sharma16-Dec-10 4:29
Hari Om Prakash Sharma16-Dec-10 4:29 
AnswerRe: I am read File and I want to get information from each 256 byte and from each 256 byte ? Pin
Luc Pattyn16-Dec-10 5:13
sitebuilderLuc Pattyn16-Dec-10 5:13 
GeneralRe: I am read File and I want to get information from each 256 byte and from each 256 byte ? Pin
Hari Om Prakash Sharma16-Dec-10 5:16
Hari Om Prakash Sharma16-Dec-10 5:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.