Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old September 18th, 2011, 01:59 AM
iswan2011 iswan2011 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2011
Posts: 3 iswan2011 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 37 m 53 sec
Reputation Power: 0
Multiuser login page

hai I am creating login page which have database connection.I want to modified my code here into multiuser access.For example is user are from admin department then he can access automatically into admin page after login successful
and if the user are from Counter department then he can access automatically into department page after login successful . In my database i have column 5 column which is username, password, phone, addresss and department. I have 2 textbox which is for username and password , also button login. For software i am using Microsoft visual 2005 and database i am using sql 2005. Please advice me .....



Public Class Form1
Dim name = Me.StaffTableAdapter
Private Sub btnlogin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnlogin.Click

Dim name = me.StaffTableAdapter.UsernamePassword(Me.txtusername.Text, Me.txtpassword.Text, Me.txtdepartment.Text)

if name is nothing then
Msgbox(Invalid username and password)
else

Admin.Show()

end if
end sub

Reply With Quote
  #2  
Old December 8th, 2011, 04:28 AM
the-listener the-listener is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2011
Posts: 23 the-listener User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 48 m 40 sec
Reputation Power: 0
Quote:
Originally Posted by iswan2011
hai I am creating login page which have database connection.I want to modified my code here into multiuser access.For example is user are from admin department then he can access automatically into admin page after login successful
and if the user are from Counter department then he can access automatically into department page after login successful . In my database i have column 5 column which is username, password, phone, addresss and department. I have 2 textbox which is for username and password , also button login. For software i am using Microsoft visual 2005 and database i am using sql 2005. Please advice me .....



Public Class Form1
Dim name = Me.StaffTableAdapter
Private Sub btnlogin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnlogin.Click

Dim name = me.StaffTableAdapter.UsernamePassword(Me.txtusername.Text, Me.txtpassword.Text, Me.txtdepartment.Text)

if name is nothing then
Msgbox(Invalid username and password)
else

Admin.Show()

end if
end sub




why not add another column/field to your data "startpage" and use it to get to the appropriate page

bill stewart - here to talk

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > Multiuser login page

Developer Shed Advertisers and Affiliates



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 | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap