Exemplo n.º 1
0
        private void setupLoginsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (CommonProcs.CheckAccessLevel() < 10)
            {
                MessageBox.Show("Not Authorized to View/Edit logins");
                return;
            }

            fmLoginEdit fLogEdit = new fmLoginEdit();

            fLogEdit.ShowDialog();
        }
Exemplo n.º 2
0
        private void gvRecap_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            if (gvRecap.Columns[e.ColumnIndex].Name == "SupApproved")
            {
                UncheckApproval(e);
            }
            else if (gvRecap.Columns[e.ColumnIndex].Name == "OMApproved")
            {
                UncheckApproval(e);
            }
            else if (gvRecap.Columns[e.ColumnIndex].Name == "HOApproved")
            {
                UncheckApproval(e);
            }


            else if (gvRecap.Columns[e.ColumnIndex].Name == "SupApproved")
            {
                if (CommonProcs.CheckAccessLevel() < 9)
                {
                    MessageBox.Show("Not Authorized to approve Timesheet");
                    return;
                }

                ApproveBySuper(e);
                FillTotalsView();
            }
            else if (gvRecap.Columns[e.ColumnIndex].Name == "OMApproved")
            {
                if (CommonProcs.CheckAccessLevel() < 10)
                {
                    MessageBox.Show("Not Authorized to approve Timesheet");
                    return;
                }
                ApproveByOM(e);
                FillTotalsView();
            }
            else if (gvRecap.Columns[e.ColumnIndex].Name == "HOApproved")
            {
                if (CommonProcs.CheckAccessLevel() != 10)
                {
                    MessageBox.Show("Not Authorized to approve Timesheet");
                    return;
                }
                ApproveByHO(e);
                FillTotalsView();
            }
            else if (gvRecap.Columns[e.ColumnIndex].Name == "view")
            {
                ShowTimesheet();
            }
        }
Exemplo n.º 3
0
        //private void btnCheckSup_Click(object sender, EventArgs e)
        //{
        //    CheckAll("SUP");
        //}

        //private void btnCheckOM_Click(object sender, EventArgs e)
        //{
        //    CheckAll("OM");
        //}

        //private void btnCheckHO_Click(object sender, EventArgs e)
        //{
        //    CheckAll("HO");
        //}
        private void CheckAll(string btnName, bool checkedAll)
        {
            string checkVal = "1";

            if (checkedAll)
            {
                checkVal = "0";
            }
            switch (btnName)
            {
            case "SUP":
                if (CommonProcs.CheckAccessLevel() < 9)
                {
                    MessageBox.Show("Not Authorized to approve Timesheet");
                    return;
                }
                break;

            case "OM":
                if (CommonProcs.CheckAccessLevel() < 10)
                {
                    MessageBox.Show("Not Authorized to approve Timesheet");
                    return;
                }

                break;
                //case "HO":
                //    if (CommonProcs.CheckAccessLevel() != 10)
                //    {
                //        MessageBox.Show("Not Authorized to approve Timesheet");
                //        return;
                //    }

                //    break;
            }
            ApproveAll(btnName, checkVal);
            FillTotalsView();
        }