private void tasksToolStripMenuItem_Click(object sender, EventArgs e) { TasksForm taksForm = new TasksForm(); Initial_Form(taksForm); pnMain.Controls.Add(taksForm); taksForm.BringToFront(); taksForm.Show(); }
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) { var senderGrid = (DataGridView)sender; if (senderGrid.Columns[e.ColumnIndex] is DataGridViewButtonColumn && e.RowIndex >= 0 && e.ColumnIndex == 3) { var projectNameCell = dataGridView1[0, e.RowIndex].Value; if (projectNameCell != null) { string projectName = projectNameCell.ToString(); decimal projectId = this.db.Projects.Where(p => p.ProjectName == projectName).Select(p => p.ProjectId).FirstOrDefault(); TasksForm tasksForm = new TasksForm(this.employee, projectId, projectName); tasksForm.EditEventHandler += TasksForm_EditEventHandler; tasksForm.DeleteEventHandler += TasksForm_DeleteEventHandler; tasksForm.Show(); } } }
private void OpenFormTask(object arg) { var task = new TasksForm(); task.Show(); }
public void PrepareWindow() { SetEvents(); _form.Show(); }
private void ShowTasks_Click(object sender, EventArgs e) { TasksForm tasks = new TasksForm(); tasks.Show(); }