Exemplo n.º 1
0
 public childTasksForm(User _user, Models.Task _task)
 {
     InitializeComponent();
     user = _user;
     task = _task;
     if (task != null)
     {
         loadData();
     }
     instance = this;
 }
Exemplo n.º 2
0
 private void addUpdateSubTaskToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (childTask == null)
     {
         childTask = new childTasksForm(theUser, null);
         //childTask.MdiParent = this;
         childTask.StartPosition = FormStartPosition.CenterScreen;
         childTask.FormClosed   += ChildTask_FormClosed;
         childTask.ShowDialog();
     }
     else
     {
         childTask.Activate();
     }
 }
 public AddUpdateChildTaskForm(User _user, bool _isUpdate, dateForm dateForm, childTasksForm childTasksForm)
 {
     InitializeComponent();
     user     = _user;
     isUpdate = _isUpdate;
     //load tasks into comboBox
     this.dateForm       = dateForm;
     this.childTasksForm = childTasksForm;
     //LoadComboBoxes();
     //comboPriority.SelectedIndex = 0;
     instance = this;
     deadlinePicker.Format       = DateTimePickerFormat.Custom;
     deadlinePicker.CustomFormat = "MM/dd/yyyy hh:mm tt";
     if (dateForm != null)
     {
         this.taskTitle = TaskController.getATask(dateForm.getSelectedNodeTaskID()).title;
     }
     else if (childTasksForm != null)
     {
         this.taskTitle = childTasksForm.getTask().title;
     }
 }
Exemplo n.º 4
0
        private void listTaskGridView_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
                if (e.ColumnIndex == 12)
                {
                    DataGridViewRow row  = this.listTaskGridView.Rows[e.RowIndex];
                    Models.Task     task = new Models.Task();
                    task.task_owner = (int)row.Cells["task_owner"].Value;
                    task.taskID     = (int)row.Cells["taskID"].Value;
                    task.title      = row.Cells["title"].Value.ToString();
                    if (row.Cells["task_priority"].Value == DBNull.Value)
                    {
                        task.task_priority = -1;
                    }
                    else
                    {
                        task.task_priority = Convert.ToInt32(row.Cells["task_priority"].Value);
                    }
                    if (row.Cells["taskType"].Value == DBNull.Value)
                    {
                        task.taskType = -1;
                    }
                    else
                    {
                        task.taskType = Convert.ToInt32(row.Cells["taskType"].Value);
                    }

                    childTasksForm subTaskView = new childTasksForm(user, task);
                    subTaskView.StartPosition = FormStartPosition.CenterScreen;
                    subTaskView.ShowDialog();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, ex.GetType().ToString());
            }
        }
Exemplo n.º 5
0
 private void ChildTask_FormClosed(object sender, FormClosedEventArgs e)
 {
     childTask.Dispose();
     childTask = null;
 }