Facebook
From Trivial Bee, 1 Year ago, written in Plain Text.
This paste is a reply to Untitled from Speedy Wolf - go back
Embed
Viewing differences between Untitled and Re: Untitled
employee.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace WindowsFormsApp2
{
        public partial class Employee
Form1 : Form
        {
            private int _empID;
            private string _loginName;
            private string _password;
            private int _securityLevel;
            
public int EmployeeID
Form1()
            {
                get { return _empID; }
InitializeComponent();
            }
            public string LoginName
private void button1_Click(object sender, EventArgs e)
            {
                get { return _loginName; }
                set { _loginName = value; }
this.Close();
            }
            public string Password
private void btnLogin_Click(object sender, EventArgs e)
            {
                get { return _password; }
                set { _password 
Employee employee value; }
            }
            public int SecurityLevel
            {
                get { return _securityLevel; }
            }
            public Boolean Login(string loginName,string password)
            {
                if(loginName == "Jono" & password == "wkwk")
new Employee(tbUsername.Text, tbPassword.Text);
                if (employee.Login(employee.LoginName, employee.Password))
                {
                    _empID = 1;
                    _securityLevel = 2;
                    return true;
                }
                else if(loginName=="Jones" & password == "haha")
                {
                    _empID = 2;
                    _securityLevel = 4;
                    return true;
MessageBox.Show("Login berhasil, ID anda adalah:" + employee.EmployeeID.ToString());
                }
                else
                {
                    return false;
MessageBox.Show("Gagal Login");
                }
            }
        }
  \n}\n}

Replies to Re: Untitled rss

Title Name Language When
Re: Re: Untitled Flying Hummingbird text 1 Year ago.