Exemplo n.º 1
0
        private void LockMe()
        {
            FormStatus        frm   = new FormStatus();
            List <FormStatus> lists = new List <FormStatus>();

            lists.Clear();
            lists = frm.Load();

            foreach (var item in lists)
            {
                LockStatus = item.Form_Status;
            }

            if (LockStatus.Equals("Inactive"))
            {
                //timer1.Enabled = false;
                frmMainClient top = new frmMainClient();
                top.TimeTurnOn();
                this.Close();
            }
        }
Exemplo n.º 2
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            util.NoZeroScore(dgvAllEvent);

            if (util.toSave == true)
            {
                string            message = "Please double check the scores before submitting ?";
                string            title   = "Tabulation System";
                MessageBoxButtons buttons = MessageBoxButtons.YesNo;
                DialogResult      result  = MessageBox.Show(message, title, buttons, MessageBoxIcon.Information);

                if (result == DialogResult.Yes)
                {
                    string            message2 = "Submit score now?";
                    string            title2   = "Tabulation System";
                    MessageBoxButtons buttons2 = MessageBoxButtons.YesNo;
                    DialogResult      result2  = MessageBox.Show(message2, title2, buttons2, MessageBoxIcon.Information);

                    if (result == DialogResult.Yes)
                    {
                        if (EventName.Equals("Long Gown Only"))
                        {
                            #region LongGownOnly
                            LongGownOnly score = new LongGownOnly();
                            for (int i = 0; i < dgvAllEvent.Rows.Count; i++)
                            {
                                score.Judge  = lblJudgeNo.Text;                               //Judge No
                                score.Can_no = dgvAllEvent.Rows[i].Cells[0].Value.ToString(); //Candidate Number    [0]
                                score.Score  = dgvAllEvent.Rows[i].Cells[1].Value.ToString(); //Score per candidate [1]
                                score.Save();
                            }
                            MessageBox.Show("Record Submitted!", "Tabulation System", MessageBoxButtons.OK, MessageBoxIcon.Information);
                            #endregion
                        }

                        else if (EventName.Equals("Semi Final - Q and A"))
                        {
                            #region SemiFinal
                            SemiFinal score = new SemiFinal();
                            for (int i = 0; i < dgvAllEvent.Rows.Count; i++)
                            {
                                score.Judge        = lblJudgeNo.Text;                               //Judge No
                                score.Can_no       = dgvAllEvent.Rows[i].Cells[0].Value.ToString(); //Candidate Number    [0]
                                score.Score_beauty = dgvAllEvent.Rows[i].Cells[1].Value.ToString(); //Score per candidate [1
                                score.Score_wit    = dgvAllEvent.Rows[i].Cells[2].Value.ToString(); //Score per candidate [1]

                                score.Save();
                            }
                            MessageBox.Show("Record Submitted!", "Tabulation System", MessageBoxButtons.OK, MessageBoxIcon.Information);
                            #endregion
                        }

                        else if (EventName.Equals("Final - Q and A"))
                        {
                            #region Final - Q and A
                            Final score = new Final();
                            for (int i = 0; i < dgvAllEvent.Rows.Count; i++)
                            {
                                score.Judge        = lblJudgeNo.Text;                               //Judge No
                                score.Can_no       = dgvAllEvent.Rows[i].Cells[0].Value.ToString(); //Candidate Number    [0]
                                score.Score_beauty = dgvAllEvent.Rows[i].Cells[1].Value.ToString(); //Score per candidate [1
                                score.Score_wit    = dgvAllEvent.Rows[i].Cells[2].Value.ToString(); //Score per candidate [1]

                                score.Save();
                            }
                            MessageBox.Show("Record Submitted!", "Tabulation System", MessageBoxButtons.OK, MessageBoxIcon.Information);
                            #endregion
                        }

                        else if (EventName.Equals("Long Gown Competition"))
                        {
                            #region Long Gown with Beauty Face

                            BeautyAndLongGown score = new BeautyAndLongGown();

                            for (int i = 0; i < dgvAllEvent.Rows.Count; i++)
                            {
                                score.Judge        = lblJudgeNo.Text;                               //Judge No
                                score.Can_no       = dgvAllEvent.Rows[i].Cells[0].Value.ToString(); //Candidate Number    [0]
                                score.Score_beauty = dgvAllEvent.Rows[i].Cells[1].Value.ToString(); //Score per candidate [1
                                score.Score_wit    = dgvAllEvent.Rows[i].Cells[2].Value.ToString(); //Score per candidate [1]

                                score.Save();
                            }
                            MessageBox.Show("Record Submitted!", "Tabulation System", MessageBoxButtons.OK, MessageBoxIcon.Information);
                            #endregion
                        }

                        this.Dispose();
                        frmMainClient main = new frmMainClient();
                        main.ShowDialog();
                    }
                    else
                    {
                        return;
                    }
                }
            }
            else
            {
                return;
            }
        }
Exemplo n.º 3
0
        private void button2_Click(object sender, EventArgs e)
        {
            frmMainClient frm = new frmMainClient();

            frm.Show();
        }