Esempio n. 1
0
        private void Login()
        {
            PassWord     password = new PassWord();
            DialogResult result   = password.ShowDialog();

            if (result == DialogResult.OK)
            {
                AdminLogin = password.adminLogin;
                AddNewJob();
            }
        }
Esempio n. 2
0
        private void toolStripAdminButton_Click(object sender, EventArgs e)
        {
            CheckForAdmins();
            PassWord     passWord = new PassWord();
            DialogResult result   = passWord.ShowDialog();

            if (result == DialogResult.OK)
            {
                AdminPage adminPage = new AdminPage();
                adminPage.ShowDialog();
            }
        }
Esempio n. 3
0
        private void BtnRestoreDataBase_Click(object sender, EventArgs e)
        {
            PassWord     passWord = new PassWord();
            DialogResult result   = passWord.ShowDialog();

            if (result == DialogResult.OK)
            {
                openFileDialog1.FileName = "";
                openFileDialog1.Filter   = "PrepAndPaint databases (*.db)|*.db";
                if (openFileDialog1.ShowDialog() == DialogResult.OK)
                {
                    PrepAndPaintDB.RestoreDataBase(openFileDialog1.FileName);
                    GetInfo();
                }
            }
        }
Esempio n. 4
0
 private void BtnDelete_Click(object sender, EventArgs e)
 {
     if (AdminLogin)
     {
         DeleteNote();
     }
     else
     {
         PassWord     passWord = new PassWord();
         DialogResult result   = passWord.ShowDialog();
         if (result == DialogResult.OK)
         {
             AdminLogin = true;
             DeleteNote();
         }
     }
 }
Esempio n. 5
0
 private void BtnEdit_Click(object sender, EventArgs e)
 {
     CheckForAdmins();
     if (adminLogin)
     {
         EditJob();
     }
     else
     {
         PassWord     passWord = new PassWord();
         DialogResult result   = passWord.ShowDialog();
         if (result == DialogResult.OK)
         {
             adminLogin = passWord.adminLogin;
             EditJob();
         }
     }
 }
Esempio n. 6
0
 private void BtnDelete_Click(object sender, EventArgs e)
 {
     CheckForAdmins();
     if (adminLogin)
     {
         DeleteEntry();
     }
     else
     {
         PassWord     passWord = new PassWord();
         DialogResult result   = passWord.ShowDialog();
         if (result == DialogResult.OK)
         {
             adminLogin = true;
             DeleteEntry();
         }
     }
 }
Esempio n. 7
0
 private void BtnUnlockCompleteOption_Click(object sender, EventArgs e)
 {
     CheckForAdmins();
     if (adminLogin)
     {
         checkBoxComplete.Enabled = true;
     }
     else
     {
         PassWord     passWord = new PassWord();
         DialogResult result   = passWord.ShowDialog();
         if (result == DialogResult.OK)
         {
             adminLogin = passWord.adminLogin;
             checkBoxComplete.Enabled = true;
         }
     }
 }
Esempio n. 8
0
 private void createJobToolStripButton_Click(object sender, EventArgs e)
 {
     CheckForAdmins();
     if (AdminLogin)
     {
         CreateNewJob();
     }
     else
     {
         PassWord     password = new PassWord();
         DialogResult result   = password.ShowDialog();
         if (result == DialogResult.OK)
         {
             AdminLogin = password.adminLogin;
             CreateNewJob();
         }
     }
 }
Esempio n. 9
0
 private void dataGridView_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     CheckForAdmins();
     if (AdminLogin)
     {
         EditJob();
     }
     else
     {
         PassWord     passWord = new PassWord();
         DialogResult result   = passWord.ShowDialog();
         if (result == DialogResult.OK)
         {
             AdminLogin = passWord.adminLogin;
             EditJob();
         }
     }
 }