Click here to Skip to main content
15,881,882 members
Home / Discussions / C#
   

C#

 
GeneralFlickering Pin
bouli2-Feb-04 7:20
bouli2-Feb-04 7:20 
GeneralRe: Flickering Pin
Heath Stewart2-Feb-04 9:43
protectorHeath Stewart2-Feb-04 9:43 
GeneralGDI+ Pin
bouli2-Feb-04 5:00
bouli2-Feb-04 5:00 
GeneralRe: GDI+ Pin
Mazdak2-Feb-04 5:17
Mazdak2-Feb-04 5:17 
GeneralRe: GDI+ Pin
bouli2-Feb-04 5:18
bouli2-Feb-04 5:18 
GeneralRe: GDI+ Pin
Mazdak2-Feb-04 5:27
Mazdak2-Feb-04 5:27 
GeneralRe: GDI+ Pin
bouli2-Feb-04 5:30
bouli2-Feb-04 5:30 
Generalpassword checking Pin
ASGill2-Feb-04 2:33
ASGill2-Feb-04 2:33 
hey,

im coding a system in c#...i have got four buttons that link to four diff departments
in the system. these buttons when clicked, opens up the same dialog box which requires a username and
password to access to the respective parts of the system(according to the buttons).

the user name and password is different for each department is it possible for me to use "if else" statements to check
the passwords from the database(SQL).

i've coded in plain english just to check if its logic and possible


private void btnOK_Click(object sender, System.EventArgs e) //ok button on the password dialog box
{

if (btnReg was clicked)
{
check for user name and password in the REG table


if (username and password is correct)
{
allow access
}
else
{
messagebox saying incorrect password
}

}

if (btnDiag was clicked)
{
check for user name and password in the DIAG table


if (username and password is correct)
{
allow access
}
else
{
messagebox saying incorrect password
}

}
}


and so on for the rest of the buttons....

if this is not possible...then is there anyway i can do this...or do i have to code four different password dialog boxes for
each of the buttons which will not be very good for the system, design wise and also extra coding....arrrgghh!! HELP!!

ArvinderGillCool | :cool:



Arvinder Singh Gill
GeneralRe: password checking Pin
Rhys__6662-Feb-04 3:04
Rhys__6662-Feb-04 3:04 
GeneralRe: password checking Pin
Heath Stewart2-Feb-04 3:15
protectorHeath Stewart2-Feb-04 3:15 
GeneralC# Standard Template Library Pin
TeamWild2-Feb-04 1:11
TeamWild2-Feb-04 1:11 
GeneralRe: C# Standard Template Library Pin
Colin Angus Mackay2-Feb-04 1:36
Colin Angus Mackay2-Feb-04 1:36 
GeneralRe: C# Standard Template Library Pin
TeamWild2-Feb-04 2:00
TeamWild2-Feb-04 2:00 
GeneralRe: C# Standard Template Library Pin
Colin Angus Mackay2-Feb-04 2:35
Colin Angus Mackay2-Feb-04 2:35 
GeneralRe: C# Standard Template Library Pin
Judah Gabriel Himango2-Feb-04 8:25
sponsorJudah Gabriel Himango2-Feb-04 8:25 
GeneralRe: C# Standard Template Library Pin
Nemanja Trifunovic2-Feb-04 12:07
Nemanja Trifunovic2-Feb-04 12:07 
GeneralRe: C# Standard Template Library Pin
Heath Stewart2-Feb-04 3:04
protectorHeath Stewart2-Feb-04 3:04 
GeneralRe: C# Standard Template Library Pin
boogs2-Feb-04 9:01
boogs2-Feb-04 9:01 
GeneralClickety Pin
Colin Angus Mackay2-Feb-04 11:57
Colin Angus Mackay2-Feb-04 11:57 
GeneralButtons in DataGrid Pin
Lyubomir Naydenov2-Feb-04 0:39
Lyubomir Naydenov2-Feb-04 0:39 
GeneralRe: Buttons in DataGrid Pin
Mazdak2-Feb-04 0:50
Mazdak2-Feb-04 0:50 
GeneralRe: Buttons in DataGrid Pin
Heath Stewart2-Feb-04 3:20
protectorHeath Stewart2-Feb-04 3:20 
GeneralRe: Buttons in DataGrid Pin
Lyubomir Naydenov2-Feb-04 9:42
Lyubomir Naydenov2-Feb-04 9:42 
QuestionEasy URL Query parsing? Pin
3ddA2-Feb-04 0:08
3ddA2-Feb-04 0:08 
AnswerRe: Easy URL Query parsing? Pin
Heath Stewart2-Feb-04 3:27
protectorHeath Stewart2-Feb-04 3:27 

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.