Пример #1
0
 private void ReportLBL_Click(object sender, EventArgs e)
 {
     GuardsPNL.Hide();
     ReportPNL.Show();
     GuardsLBL.ForeColor = _light;
     ReportLBL.ForeColor = _dark;
 }
Пример #2
0
        private bool DataValidation()
        {
            var ret = true;

            if (GuardsGRD.RowCount == 0)
            {
                RylMessageBox.ShowDialog("There are no guards to be dismissed \nThis request will be canceled",
                                         "Warning", MessageBoxButtons.OK, MessageBoxIcon.Error);
                Close();
                GuardsPNL.Show();
                ReportPNL.Hide();
                GuardsLBL.ForeColor = _dark;
                ReportLBL.ForeColor = _light;
                ret = false;
            }
            if (EnableIncidentCHKBX.Checked)
            {
                if (LocationBX.Text.Equals(""))
                {
                    ShowToolTipOnBx(LocationTLTP, "Event Location", "Where did this incident happen?", LocationBX);
                    ret = false;
                }
                if (DescriptionBX.Text.Equals(""))
                {
                    ShowToolTipOnBx(DescriptionTLTP, "Event Description", "What happened in this incident?",
                                    DescriptionBX);
                    ret = false;
                }
                if (!ret)
                {
                    GuardsPNL.Hide();
                    ReportPNL.Show();
                    GuardsLBL.ForeColor = _light;
                    ReportLBL.ForeColor = _dark;
                }
            }
            return(ret);
        }