Facebook
From Speedy Wolf, 5 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 342
  1. employee.cs
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace WindowsFormsApp2
  8. {
  9.         class Employee
  10.         {
  11.         private int _empID;
  12.         private string _loginName;
  13.         private string _password;
  14.         private int _securityLevel;
  15.         public int EmployeeID
  16.         {
  17.                 get { return _empID; }
  18.         }
  19.         public string LoginName
  20.         {
  21.                 get { return _loginName; }
  22.                 set { _loginName = value; }
  23.         }
  24.         public string Password
  25.         {
  26.                 get { return _password; }
  27.                 set { _password = value; }
  28.         }
  29.         public int SecurityLevel
  30.         {
  31.                 get { return _securityLevel; }
  32.         }
  33.         public Boolean Login(string loginName,string password)
  34.         {
  35.                 if(loginName == "Jono" & password == "wkwk")
  36.                 {
  37.                 _empID = 1;
  38.                 _securityLevel = 2;
  39.                 return true;
  40.                 }
  41.                 else if(loginName=="Jones" & password == "haha")
  42.                 {
  43.                 _empID = 2;
  44.                 _securityLevel = 4;
  45.                 return true;
  46.                 }
  47.                 else
  48.                 {
  49.                 return false;
  50.                 }
  51.         }
  52.         }
  53.  
  54. }
  55.  

Replies to Untitled rss

Title Name Language When
Re: Untitled Trivial Bee text 5 Years ago.