Click here to Skip to main content
15,897,718 members
Home / Discussions / C#
   

C#

 
GeneralRe: Closing a form before it even shows Pin
Justin Perez28-Jan-08 4:14
Justin Perez28-Jan-08 4:14 
GeneralListview:extracting info from Hidden column Pin
Adnan Siddiqi28-Jan-08 2:10
Adnan Siddiqi28-Jan-08 2:10 
GeneralRe: Listview:extracting info from Hidden column Pin
led mike28-Jan-08 6:24
led mike28-Jan-08 6:24 
GeneralRe: Listview:extracting info from Hidden column Pin
Adnan Siddiqi28-Jan-08 7:12
Adnan Siddiqi28-Jan-08 7:12 
GeneralRe: Listview:extracting info from Hidden column Pin
led mike28-Jan-08 7:21
led mike28-Jan-08 7:21 
QuestionHow to print a current doucument with print privews using asp.net with c#.net Pin
srinivassrinitha28-Jan-08 2:02
srinivassrinitha28-Jan-08 2:02 
GeneralRe: How to print a current doucument with print privews using asp.net with c#.net Pin
Pete O'Hanlon28-Jan-08 2:12
mvePete O'Hanlon28-Jan-08 2:12 
GeneralHelp with Logon Pin
MumbleB28-Jan-08 1:42
MumbleB28-Jan-08 1:42 
Hi All.

I have written an application with a logon form. Previously I used to hardcode the users logon details withing the code. The problem I have with my current project is that I could possibly have upto 100 users and would have to add or remove users from time to time. I am using an Access DB with the application. I want to create a table in the DB to store the Users details.

My problem is that I am not sure how to check the details entered on the logon form back to the DB. Below is what I currently have. Can somebody please help me change the below so that it rather reads through a table in the db to check the users details. Once the details have been verified it should then go onto opening the main form of the application. Any help or advice with this would be greatly appreciated.

private void btnLogon_Click(object sender, EventArgs e)
{
    MainApp mnapp = new MainApp();

    if (txtboxUserName.Text == "user1" && txtboxPassword.Text == "user1pwd"
        ||txtboxUserName.Text == "user2" && txtboxPassword.Text == "user2pwd")
    {
        this.DialogResult = DialogResult.OK;
    }
    else MessageBox.Show("Invalid username and or password supplied", "Logon Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}

QuestionHow to pass data between two applications on the single system? Pin
Hari Om Prakash Sharma28-Jan-08 0:29
Hari Om Prakash Sharma28-Jan-08 0:29 
GeneralRe: How to pass data between two applications on the single system? Pin
Anthony Mushrow28-Jan-08 0:46
professionalAnthony Mushrow28-Jan-08 0:46 
GeneralRe: How to pass data between two applications on the single system? Pin
Hari Om Prakash Sharma28-Jan-08 1:04
Hari Om Prakash Sharma28-Jan-08 1:04 
QuestionRe: How to pass data between two applications on the single system? Pin
Ashfield28-Jan-08 0:49
Ashfield28-Jan-08 0:49 
GeneralRe: How to pass data between two applications on the single system? Pin
Hari Om Prakash Sharma28-Jan-08 0:57
Hari Om Prakash Sharma28-Jan-08 0:57 
GeneralRe: How to pass data between two applications on the single system? Pin
Ashfield28-Jan-08 1:13
Ashfield28-Jan-08 1:13 
GeneralRe: How to pass data between two applications on the single system? Pin
Pete O'Hanlon28-Jan-08 1:29
mvePete O'Hanlon28-Jan-08 1:29 
Questionhow to modify dictionary value Pin
justintimberlake27-Jan-08 23:58
justintimberlake27-Jan-08 23:58 
AnswerRe: how to modify dictionary value Pin
Justin Perez28-Jan-08 4:20
Justin Perez28-Jan-08 4:20 
GeneralRe: how to modify dictionary value Pin
justintimberlake28-Jan-08 16:21
justintimberlake28-Jan-08 16:21 
GeneralRe: how to modify dictionary value Pin
PIEBALDconsult28-Jan-08 16:28
mvePIEBALDconsult28-Jan-08 16:28 
GeneralRe: how to modify dictionary value Pin
justintimberlake28-Jan-08 16:47
justintimberlake28-Jan-08 16:47 
GeneralRe: how to modify dictionary value Pin
Scott Dorman28-Jan-08 17:58
professionalScott Dorman28-Jan-08 17:58 
Questionhow can i acessthe xml file in c#? Pin
samidhas27-Jan-08 23:55
samidhas27-Jan-08 23:55 
GeneralRe: how can i acessthe xml file in c#? Pin
Pete O'Hanlon28-Jan-08 0:23
mvePete O'Hanlon28-Jan-08 0:23 
GeneralRe: how can i acessthe xml file in c#? Pin
samidhas28-Jan-08 0:36
samidhas28-Jan-08 0:36 
GeneralRe: how can i acessthe xml file in c#? Pin
J a a n s28-Jan-08 1:25
professionalJ a a n s28-Jan-08 1:25 

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.