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(); } }
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; }
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; } } }
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); }
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; } } }
/// <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(); }