Click here to Skip to main content
16,006,001 members
Home / Discussions / C#
   

C#

 
GeneralRe: Raising events in C# ASP.NET app. Pin
Andy Smith28-Jul-02 21:50
Andy Smith28-Jul-02 21:50 
Generaldatabase Pin
Shotgun28-Jul-02 12:40
Shotgun28-Jul-02 12:40 
GeneralRe: database Pin
James T. Johnson28-Jul-02 13:41
James T. Johnson28-Jul-02 13:41 
GeneralSigning an assembly Pin
afronaut28-Jul-02 11:53
afronaut28-Jul-02 11:53 
GeneralRe: Signing an assembly Pin
Nnamdi Onyeyiri28-Jul-02 12:51
Nnamdi Onyeyiri28-Jul-02 12:51 
GeneralRe: Signing an assembly Pin
afronaut28-Jul-02 12:56
afronaut28-Jul-02 12:56 
QuestionHow to create a drag box? Pin
albean28-Jul-02 4:50
albean28-Jul-02 4:50 
GeneralListBox linked to Database Pin
laphijia28-Jul-02 4:34
laphijia28-Jul-02 4:34 
I have a database that contains 2 tables.
The first called Users contains username and password
the second called PhoneNumbers contains a primary key called PhoneNumberID, a User column and a column with the telephone numbers of the users, that can be 0, 1 or more.

There is a relationship one-two-many between the username in the Users table and the username in the PhoneNumbers table.

Now I want to make an application that displays the phone numbers of a given user and allows to add or delete new numbers.

I thought that the best method is to use a listBox, a texBox and two buttons, add and remove.
The user loads the data from the database, populate the listBox, selectt a number and clicks delete, and the number is deleted. Write a number in the textBox and clicks add and the number is added.

I make this through an XML Web Service.

I have a method that takes username and password, and returns a DataSet to the clien.
Than i use foreach to add all the returned phone numbers to the listbox.

Now THE QUESTION:
How I manage the update?
If a user added a phone number, the update should add a row to the database, if delete delete the corresponding row.

When the user clicks the update button, the code should,
check all the items actually in the listbox, determine if it was added, or know if some of the previously held was deleted.

HOW I ACCOMPLISH THIS?

And after this, how I create a link with the rows in the database, since the listbox, contains only the phone number value, but no primary key of the PhoneNumbers table?

An help is greatly apreciated.



"Nelle cose del mondo non e' il sapere ma il volere che puo'."
GeneralControl inside a panel Pin
Nnamdi Onyeyiri27-Jul-02 11:41
Nnamdi Onyeyiri27-Jul-02 11:41 
GeneralRe: Control inside a panel Pin
Ray Cassick27-Jul-02 12:51
Ray Cassick27-Jul-02 12:51 
GeneralRe: Control inside a panel Pin
Nnamdi Onyeyiri27-Jul-02 12:55
Nnamdi Onyeyiri27-Jul-02 12:55 
GeneralRe: Control inside a panel Pin
Nnamdi Onyeyiri27-Jul-02 13:01
Nnamdi Onyeyiri27-Jul-02 13:01 
GeneralRe: Control inside a panel Pin
Luis Alonso Ramos27-Jul-02 20:49
Luis Alonso Ramos27-Jul-02 20:49 
GeneralRe: Control inside a panel Pin
Nnamdi Onyeyiri27-Jul-02 21:42
Nnamdi Onyeyiri27-Jul-02 21:42 
GeneralRe: Control inside a panel Pin
Luis Alonso Ramos27-Jul-02 22:07
Luis Alonso Ramos27-Jul-02 22:07 
Questionsubclass tabpage? Pin
naijatexanstud27-Jul-02 9:46
naijatexanstud27-Jul-02 9:46 
AnswerRe: subclass tabpage? Pin
Nathan Blomquist27-Jul-02 12:55
Nathan Blomquist27-Jul-02 12:55 
GeneralSuspending redraws of a form Pin
Luis Alonso Ramos26-Jul-02 10:12
Luis Alonso Ramos26-Jul-02 10:12 
GeneralRe: Suspending redraws of a form Pin
Andres Manggini26-Jul-02 10:53
Andres Manggini26-Jul-02 10:53 
GeneralRe: Suspending redraws of a form Pin
leppie26-Jul-02 22:32
leppie26-Jul-02 22:32 
GeneralRe: Suspending redraws of a form Pin
James T. Johnson27-Jul-02 0:14
James T. Johnson27-Jul-02 0:14 
GeneralRe: Suspending redraws of a form Pin
Luis Alonso Ramos27-Jul-02 14:48
Luis Alonso Ramos27-Jul-02 14:48 
GeneralRe: Suspending redraws of a form Pin
Andres Manggini27-Jul-02 14:53
Andres Manggini27-Jul-02 14:53 
GeneralRe: Suspending redraws of a form Pin
Luis Alonso Ramos27-Jul-02 20:43
Luis Alonso Ramos27-Jul-02 20:43 
GeneralRe: Suspending redraws of a form Pin
Andres Manggini27-Jul-02 21:48
Andres Manggini27-Jul-02 21:48 

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.