Пример #1
0
        private void tasksToolStripMenuItem_Click(object sender, EventArgs e)
        {
            TasksForm taksForm = new TasksForm();

            Initial_Form(taksForm);
            pnMain.Controls.Add(taksForm);
            taksForm.BringToFront();
            taksForm.Show();
        }
Пример #2
0
        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();
                }
            }
        }
Пример #3
0
        private void OpenFormTask(object arg)
        {
            var task = new TasksForm();

            task.Show();
        }
Пример #4
0
 public void PrepareWindow()
 {
     SetEvents();
     _form.Show();
 }
Пример #5
0
        private void ShowTasks_Click(object sender, EventArgs e)
        {
            TasksForm tasks = new TasksForm();

            tasks.Show();
        }