Beispiel #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();
            }
        }
Beispiel #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;
        }
Beispiel #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;
            }
            }
        }
Beispiel #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);
 }
Beispiel #5
0
 private void button15_Click(object sender, EventArgs e)
 {
     if (DbfTB.Text == "" || fullnameValid.IsMatch(DbfTB.Text))
     {
         MessageBox.Show("INCORRECT DATA FORMAT");
     }
     else
     {
         CreateTable();
         @case.FillDgv(dataGridView1, @case.Display(), @case.GetFio(defendant.Display(), DbfTB.Text.ToUpper()));
         DbfTB.Text = null;
     }
 }
Beispiel #6
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;
            }
            }
        }
Beispiel #7
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();
        }