private void toolStripButton3_Click(object sender, EventArgs e) { AddEvent form = new AddEvent(parent.admin); form.Owner = this; form.ShowDialog(); form.Dispose(); parent.admin.ShowEvents(dataGridView1, 2, DateTime.Now, lasttp); }
/* * // прошедшие * private void radioButton1_CheckedChanged(object sender, EventArgs e) * { * parent.admin.ShowEvents(dataGridView1, 2, DateTime.Now, 2); * lasttp = 1; * } * * private void radioButton2_CheckedChanged(object sender, EventArgs e) * { * parent.admin.ShowEvents(dataGridView1, 2, DateTime.Now, 1); * lasttp = 2; * } * * private void radioButton3_CheckedChanged(object sender, EventArgs e) * { * parent.admin.ShowEvents(dataGridView1, 2, DateTime.Now, 3); * lasttp = 0; * } */ // редактировать событие private void toolStripButton5_Click(object sender, EventArgs e) { if (dataGridView1.SelectedRows.Count < 1) { return; } AddEvent form = new AddEvent(parent.admin, true, dataGridView1.SelectedRows[0].Cells[0].Value.ToString(), dataGridView1.SelectedRows[0].Cells[3].Value.ToString(), dataGridView1.SelectedRows[0].Cells[2].Value.ToString(), dataGridView1.SelectedRows[0].Cells[1].Value.ToString()); form.Owner = this; form.ShowDialog(); form.Dispose(); parent.admin.ShowEvents(dataGridView1, 2, DateTime.Now, lasttp); }