Esempio n. 1
0
        private void btnUpdate_Click(object sender, EventArgs e)
        {
            if (this.newStaff)
            {
                this.tStaff = new tStaff();
                if (this.txtFirstName.Text != "")
                    staff.SaveStaff(PopulateStaff());
            }
            else
            {
                this.PopulateStaff();
                staff.SaveStaff();

            }
            this.newStaff = false;
            this.LoadStaff();
        }
Esempio n. 2
0
        private void FrmMain_Load(object sender, EventArgs e)
        {
            if (staff != null)
            {
                return;
            }
            using (var loginForm = new frmLogin { TopLevel =     true, AutoScroll = true, Dock = DockStyle.Fill })
            {
                loginForm.ShowDialog();

                staff = loginForm.tStaff;
                if (staff != null)
                {
                     this.Text = "Empresa - Administración - Monitor " + (GetTime() > 0 ? "Tarde: " : "Dia: ")  +staff.Firstname;
                }

            }
        }
Esempio n. 3
0
 private void loginToolStripMenuItem_Click(object sender, EventArgs e)
 {
     using (var loginForm = new frmLogin { TopLevel = true, AutoScroll = true, Dock = DockStyle.Fill })
     {
         loginForm.ShowDialog();
         staff = loginForm.tStaff;
         this.Text = "Empresa - Administración - Monitor " + (GetTime() > 0 ? "Tarde: " : "Dia: ") + staff.Firstname;
     }
 }
Esempio n. 4
0
 public void SaveStaff(tStaff staff)
 {
     Wrapper.SaveStaff(staff);
 }