private void button5_Click(object sender, EventArgs e) { if (dataGridView2.SelectedCells[0].RowIndex < dataGridView2.Rows.Count) { TSForm = new TScheduleForm(ObjTask2); TSForm.Show(); } }
private void dataGridView2_MouseDoubleClick(object sender, MouseEventArgs e) { if (dataGridView2.SelectedCells[0].RowIndex < dataGridView2.Rows.Count) { TSForm = new TScheduleForm(ObjTask2); TSForm.Show(); } else { AddTodaySchedule(0); } }
public void AddTodaySchedule(int t) { TSForm = new TScheduleForm(); TSForm.TaskType = t; TSForm.Show(); }