private void addTaskButton_Click(object sender, EventArgs e) { var form = new NewTaskForm(dataTable, monthCalendar1.SelectionRange.Start); form.StartPosition = FormStartPosition.CenterParent; form.ShowDialog(); monthCalendar1_DateChanged(sender, null); }
private void editTaskButton_Click(object sender, EventArgs e) { foreach (DataGridViewRow row in dataGridView1.SelectedRows) { var form = new NewTaskForm(dataTable, monthCalendar1.SelectionRange.Start, row); form.StartPosition = FormStartPosition.CenterParent; form.ShowDialog(); } monthCalendar1_DateChanged(sender, null); }