4 Replies - 2351 Views - Last Post: 13 October 2011 - 06:55 AM Rate Topic: -----

#1 Logangov  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 13-October 11

C# windows forms

Posted 13 October 2011 - 01:58 AM

I have created a login screen using visual studio C# 2010, I want to link form to after members have logged in. How do I do this?
How do I enter multiple users for this login application.

Help much appreciated
Is This A Good Question/Topic? 0
  • +

Replies To: C# windows forms

#2 tlhIn`toq  Icon User is online

  • Closing in on 5,000
  • member icon

Reputation: 4926
  • View blog
  • Posts: 10,462
  • Joined: 02-June 10

Re: C# windows forms

Posted 13 October 2011 - 06:43 AM

There are a LOT of ways you can go with this.

But personally I create a Permissions class that has properties for my needs:
.CanExit
.CanEditUsers
.CanIssueRefunds
and so on.

Each of your User classes has a Permissions object


class User
{
  Permissions myPerms = new Permissions();
  
  #region Constructor
  #endrregion

  #region Methods
  bool correct Checkpassword(Username, Password);
  if (correct)myPerms = LoadPermissions(Username);
  #endregion Methods
}


That gets you the concept. *HOW* you save and store these is up to you. Database, XML files, Registry, Each user on their own USB flash drive... Whatever... That's up to you and your application.

This post has been edited by tlhIn`toq: 13 October 2011 - 06:44 AM
Reason for edit:: typo

Was This Post Helpful? 0
  • +
  • -

#3 Curtis Rutland  Icon User is online

  • (╯°□°)╯︵ (~ .o.)~
  • member icon


Reputation: 3792
  • View blog
  • Posts: 6,389
  • Joined: 08-June 10

Re: C# windows forms

Posted 13 October 2011 - 06:43 AM

Tutorial for communicating between forms:

http://www.dreaminco...ny-other-forms/
Was This Post Helpful? 0
  • +
  • -

#4 tlhIn`toq  Icon User is online

  • Closing in on 5,000
  • member icon

Reputation: 4926
  • View blog
  • Posts: 10,462
  • Joined: 02-June 10

Re: C# windows forms

Posted 13 October 2011 - 06:45 AM

See FAQ #2 for form to form communication


FAQ (Frequently Asked Questions - Updated Sep 2011

Spoiler

Was This Post Helpful? 0
  • +
  • -

#5 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 6436
  • View blog
  • Posts: 23,430
  • Joined: 12-June 08

Re: C# windows forms

Posted 13 October 2011 - 06:55 AM

It seems pretty straight forward - main screen is loading, and in the loading event opens a new login form. If the user passes let the main form continue loading, if they fail have the main form exit.

Quote

How do I enter multiple users for this login application.

You'll have to clarify this, I don't know what you mean.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1