private void Login() { PassWord password = new PassWord(); DialogResult result = password.ShowDialog(); if (result == DialogResult.OK) { AdminLogin = password.adminLogin; AddNewJob(); } }
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(); } }
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(); } } }
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(); } } }
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(); } } }
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(); } } }
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; } } }
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(); } } }
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(); } } }