Exemplo n.º 1
0
        private void Deleting_FormClosing(object sender, FormClosingEventArgs e)
        {
            switch (whichForm)
            {
            case WhichForm.Defendant:
            {
                Connection.Connector(displayer.dataGridView1, defendant.Display(), exception);
                break;
            }

            case WhichForm.Judge:
            {
                Connection.Connector(displayer.dataGridView1, judge.Display(), exception);
                break;
            }

            case WhichForm.Plaintiff:
            {
                Connection.Connector(displayer.dataGridView1, plaintiff.Display(), exception);
                break;
            }

            case WhichForm.Case:
            {
                caseDisplay.dataGridView1.Columns.Clear();
                Connection.Connector(caseDisplay.dataGridView1, @case.Display(), exception);
                break;
            }
            }
            if (e.CloseReason == CloseReason.UserClosing)
            {
                e.Cancel = true;
                Hide();
            }
        }
Exemplo n.º 2
0
        private void RefreshData()
        {
            switch (whichForm)
            {
            case WhichForm.Judge:
            {
                Connection.Connector(dataGridView1, judge.Display(), cantDisp);
                break;
            }

            case WhichForm.Plaintiff:
            {
                Connection.Connector(dataGridView1, plaintiff.Display(), cantDisp);
                break;
            }

            case WhichForm.Defendant:
            {
                Connection.Connector(dataGridView1, defendant.Display(), cantDisp);
                break;
            }
            }

            Width = 679;
            dataGridView1.Width = 643;
        }
Exemplo n.º 3
0
        private void Addition_FormClosing(object sender, FormClosingEventArgs e)
        {
            switch (whichForm)
            {
            case WhichForm.Defendant:
            {
                Connection.Connector(displayer.dataGridView1, defendant.Display(), cantDisp);
                break;
            }

            case WhichForm.Judge:
            {
                Connection.Connector(displayer.dataGridView1, judge.Display(), cantDisp);
                break;
            }

            case WhichForm.Plaintiff:
            {
                Connection.Connector(displayer.dataGridView1, plaintiff.Display(), cantDisp);
                break;
            }

            default:
            {
                MessageBox.Show("NO FORM SELECTED");
                Close();
                break;
            }
            }
        }
Exemplo n.º 4
0
 private void CaseAddition_Activated(object sender, EventArgs e)
 {
     JudgeCB.Items.Clear();
     DefendantCB.Items.Clear();
     PlaintiffCB.Items.Clear();
     Connection.FillCB(judge.Display(), JudgeCB, WhichForm.Judge);
     Connection.FillCB(defendant.Display(), DefendantCB, WhichForm.Defendant);
     Connection.FillCB(plaintiff.Display(), PlaintiffCB, WhichForm.Plaintiff);
 }
Exemplo n.º 5
0
        private void Editing_FormClosing(object sender, FormClosingEventArgs e)
        {
            switch (whichForm)
            {
            case WhichForm.Defendant:
            {
                Connection.Connector(displayer.dataGridView1, defendant.Display(), exception);
                break;
            }

            case WhichForm.Judge:
            {
                Connection.Connector(displayer.dataGridView1, judge.Display(), exception);
                break;
            }

            case WhichForm.Plaintiff:
            {
                Connection.Connector(displayer.dataGridView1, plaintiff.Display(), exception);
                break;
            }
            }
        }
Exemplo n.º 6
0
        /// <summary>
        /// Дизайн формы
        /// </summary>
        private void Design()
        {
            switch (whichForm)
            {
            case WhichForm.Defendant:
            {
                defendant = new Defendant();
                Connection.Connector(dataGridView1, defendant.Display(), cantDisp);
                break;
            }

            case WhichForm.Judge:
            {
                judge = new Judge();
                Connection.Connector(dataGridView1, judge.Display(), cantDisp);
                break;
            }

            case WhichForm.Plaintiff:
            {
                plaintiff = new Plaintiff();
                Connection.Connector(dataGridView1, plaintiff.Display(), cantDisp);
                break;
            }

            default:
            {
                MessageBox.Show("NO FORM SELECTED");
                Close();
                break;
            }
            }
            HelpFac.Text        = whichForm.ToString();
            DisplayAll.Text     = "Display all " + whichForm.ToString().ToLower();
            EditSelected.Text   = "Edit selected " + whichForm.ToString().ToLower();
            DeleteSelected.Text = "Delete selected " + whichForm.ToString().ToLower();
        }