コード例 #1
0
ファイル: Deleting.cs プロジェクト: Hutzpa/Kurs
        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();
            }
        }
コード例 #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;
        }
コード例 #3
0
ファイル: Addition.cs プロジェクト: Hutzpa/Kurs
        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;
            }
            }
        }
コード例 #4
0
ファイル: CaseAddition.cs プロジェクト: Hutzpa/Kurs
 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);
 }
コード例 #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;
            }
            }
        }
コード例 #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();
        }