Beispiel #1
0
        private void addShiftBtn_Click(object sender, EventArgs e)
        {
            infoLbl.Visible = true;
            infoLbl.Text    = "Start Time: " + startTimeTb.Text + "\nFinish Time: " + finishTimeTb.Text +
                              "\nStandard Date: " + startDateTb.Text + "\nFinishing Date: " + finishDateTb.Text;
            startDateTb.Visible  = false;
            startTimeTb.Visible  = false;
            finishDateTb.Visible = false;
            finishTimeTb.Visible = false;

            if (viewShifts == null)
            {
                viewShifts             = new ViewShifts();
                viewShifts.FormClosed += delegate { viewShifts = null; };
            }
            viewShifts.startTimeLbl.Text  += "   " + startTimeTb.Text;
            viewShifts.finishTimeLbl.Text += "   " + finishTimeTb.Text;
            viewShifts.startDateLbl.Text  += "   " + startDateTb.Text;
            viewShifts.finishDateLbl.Text += "   " + finishDateTb.Text;


            currentUser.startShiftTime  = startTimeTb.Text;
            currentUser.finishShiftTime = finishTimeTb.Text;
            currentUser.startShiftDate  = startDateTb.Text;
            currentUser.finishShiftDate = finishDateTb.Text;

            currentUser.setType("ShiftWorker");
        }
Beispiel #2
0
 private void viewShiftsBtn_Click(object sender, EventArgs e)
 {
     if (viewShifts == null)
     {
         viewShifts             = new ViewShifts();
         viewShifts.FormClosed += delegate { viewShifts = null; };
     }
     viewShifts.Show();
     viewShifts.currentUser = currentUser;
     this.Hide();
 }