private void InitializePropertyForm() { try { txtEmail.Text = EmployeeMember.Email; txtName.Text = EmployeeMember.Name; txtSurname.Text = EmployeeMember.Surname; cbxRepeatMail.Checked = EmployeeMember.RepeatMail; //Tasks TaskPeopleObjectCollection taskPeoples = new BL.Internal.TaskPeople().GetByEmployee(EmployeeMember); _tasks = new TaskObjectCollection(); foreach (TaskPeopleObject taskPeople in taskPeoples) { _tasks.Add(taskPeople.Task); } this.gdcTask.DataSource = _tasks; this.repositoryItemDateEditDueDate.NullDate = repositoryItemDateEditDueDate.MinValue; } catch (System.Exception exception1) { System.Exception innerException = exception1; throw new System.Exception(MethodBase.GetCurrentMethod().Name, innerException); } }
private void btnAddTask_Click(object sender, EventArgs e) { try { Client.Task.Task task = new Client.Task.Task(PROF_IT.Common.Enumerations.TypeForm.NewForm); if (task.ShowDialog() == DialogResult.OK) { _tasks.Add(task.TaskMember); gdcTask.Refresh(); } } catch (System.Exception excepion1) { System.Exception thisException = excepion1; Management.ShowException(thisException); } }