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

            if (result == DialogResult.OK)
            {
                AdminLogin = password.adminLogin;
                AddNewJob();
            }
        }
Ejemplo 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();
            }
        }
Ejemplo 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();
                }
            }
        }
Ejemplo 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();
         }
     }
 }
Ejemplo 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();
         }
     }
 }
Ejemplo 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();
         }
     }
 }
Ejemplo 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;
         }
     }
 }
Ejemplo 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();
         }
     }
 }
Ejemplo 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();
         }
     }
 }