private void AddMen_Click(object sender, EventArgs e) { int ind = 0; for (int i = 0; i < dataGridView1.RowCount; i++) { if (dataGridView1.Rows[i].Cells[0].Value.ToString() == dataGridView1.CurrentRow.ToString()) { ind = i; } } TaskCL taskCL = new TaskCL("none", "--", "--", "--"); ProjCl projCl = new ProjCl(dataGridView1.CurrentRow.Cells[0].Value.ToString(), 0, taskCL); AddInfoProject(projCl.nameItem); dataGridView1.Rows.RemoveAt(dataGridView1.CurrentRow.Index); }
private void button1_Click(object sender, EventArgs e) { if (comboBox1.Text == "Task") { InboxClass inboxClass = new InboxClass(InputField.Text); AddInfoInboxGrid(InputField.Text); ReadyInbox.Add(item: inboxClass); } if (comboBox1.Text == "Today") { EventClass eventClass = new EventClass(InputField.Text, DateTime.Now.ToShortDateString(), "--"); AddInfoTodayGrid(InputField.Text, DateTime.Now.ToShortDateString(), "--"); ReadyEvent.Add(item: eventClass); } if (comboBox1.Text == "Event") { dateBx.Mask = "99-99-9999"; EventClass eventClass = new EventClass(InputField.Text, "--", "--"); AddInfoTodayGrid(InputField.Text, dateBx.Text.ToString(), timeBx.Text.ToString()); ReadyEvent.Add(item: eventClass); } if (comboBox1.Text == "Project") { TaskCL taskCL = new TaskCL("none", "--", "--", "--"); ProjCl projCl = new ProjCl(InputField.Text, 0, taskCL); AddInfoProject(InputField.Text); ReadyProject.Add(item: projCl); } if (comboBox1.Text == "Sub Task") { InboxClass inboxClass = new InboxClass(InputField.Text); SubProj subProj = new SubProj(projBox.Text, inboxClass); ReadySub.Add(item: subProj); AddSubTask(InputField.Text); } InputField.Clear(); projBox.Items.Clear(); }