Exemple #1
0
        private void submit_Click(object sender, EventArgs e)
        {
            string workerIdString = WorkerIdText.Text;
            string passwordString = PasswordText.Text;
            Worker currentWorker  = new Worker(workerIdString);

            //this.WorkerId = Convert.ToInt32(workerIdString);
            //Worker currentWorker = new Worker();
            //currentWorker.populate(WorkerId);

            if (passwordString.Equals(currentWorker.GetWorkerPassword()))
            {
                BicycleRentalAgent agent = new BicycleRentalAgent(this, currentWorker);
                this.Hide();
                WorkerIdText.Clear();
                PasswordText.Clear();
                agent.Show();
            }
            else
            {
                NotificationLabel.Text = "Invalid Worker ID or Password";
            }
        }
 private void Cancel_Click(object sender, EventArgs e)
 {
     this.Hide();
     myMainScreen.Show();
 }
Exemple #3
0
 private void Back_Click(object sender, EventArgs e)
 {
     this.Hide();
     myCaller.Show();
 }
 private void backButton_Click(object sender, EventArgs e)
 {
     this.Close();
     myCaller.Show();
 }