private void ProcessEmailAddressReporter(TaskObject task, string emailAddress) { TIS.BL.Internal.Employee blEmp = new TIS.BL.Internal.Employee(); TIS.DL.Internal.Employee.EmployeeObject employee; TIS.DL.Internal.TaskPeople.TaskPeopleObject taskPeople; try { //Voorlopig enkel werkbaar voor Thomas employee = blEmp.GetEmployeeByEmail("*****@*****.**"); if (employee == null) { throw new System.Exception("E-mail adres van outlook account is niet gekend binnen TIS, gelieve de applicatiebeheerder te contacteren"); } else { taskPeople = ProcessEmployee(employee); taskPeople.Task = task; task.Reporters.Add(taskPeople); } } catch (System.Exception exception1) { System.Exception innerException = exception1; throw new System.Exception(MethodBase.GetCurrentMethod().Name, innerException); } }
private void CreateEmailAddress(TaskObject task, string emailAddress) { TIS.BL.Internal.Employee blEmp = new TIS.BL.Internal.Employee(); TIS.BL.Internal.Supplier blSup = new TIS.BL.Internal.Supplier(); TIS.BL.Internal.Unknown blUnk = new TIS.BL.Internal.Unknown(); TIS.DL.Internal.Employee.EmployeeObject employee; TIS.DL.Internal.Supplier.SupplierObject supplier; TIS.DL.Internal.Unknown.UnknownObject unknown; TIS.DL.Internal.TaskPeople.TaskPeopleObject taskPeople; try { if (PROF_IT.Common.Functions.Functions.IsEmailAddress(emailAddress)) { employee = blEmp.GetEmployeeByEmail(emailAddress); if (employee != null) { taskPeople = ProcessEmployee(employee); taskPeople.Task = task; task.AssigneesEmployee.Add(taskPeople); } supplier = blSup.GetSupplierByEmail(emailAddress); if (supplier != null) { taskPeople = ProcessSupplier(supplier); taskPeople.Task = task; task.AssigneesSupplier.Add(taskPeople); } if (supplier == null & employee == null) { unknown = blUnk.GetUnknownByEmail(emailAddress); if (unknown != null) { taskPeople = ProcessUnknown(unknown); taskPeople.Task = task; task.AssigneesUnknown.Add(taskPeople); } else { //Create Unknown record unknown = new UnknownObject(); unknown.Email = emailAddress; unknown.State = PROF_IT.Common.Enumerations.ObjectState.Created; blUnk.Save(unknown); taskPeople = ProcessUnknown(unknown); taskPeople.Task = task; task.AssigneesUnknown.Add(taskPeople); } } } } catch (System.Exception exception1) { System.Exception innerException = exception1; throw new System.Exception(MethodBase.GetCurrentMethod().Name, innerException); } }
private void ProcessEmailAddressReporter(TaskObject task, string emailAddress) { TIS.BL.Internal.Employee blEmp = new TIS.BL.Internal.Employee(); TIS.DL.Internal.Employee.EmployeeObject employee; TIS.DL.Internal.TaskPeople.TaskPeopleObject taskPeople; try { //Voorlopig enkel werkbaar voor Thomas employee = blEmp.GetEmployeeByEmail("*****@*****.**"); if (employee == null) { throw new System.Exception("E-mail adres van outlook account is niet gekend binnen TIS, gelieve de applicatiebeheerder te contacteren"); } else { taskPeople = ProcessEmployee(employee); taskPeople.Task = task; task.Reporters.Add(taskPeople); } } catch (System.Exception exception1) { System.Exception innerException = exception1; throw new System.Exception(MethodBase.GetCurrentMethod().Name, innerException); } }
private void CreateEmailAddress(TaskObject task, string emailAddress) { TIS.BL.Internal.Employee blEmp = new TIS.BL.Internal.Employee(); TIS.BL.Internal.Supplier blSup = new TIS.BL.Internal.Supplier(); TIS.BL.Internal.Unknown blUnk = new TIS.BL.Internal.Unknown(); TIS.DL.Internal.Employee.EmployeeObject employee; TIS.DL.Internal.Supplier.SupplierObject supplier; TIS.DL.Internal.Unknown.UnknownObject unknown; TIS.DL.Internal.TaskPeople.TaskPeopleObject taskPeople; try { if (PROF_IT.Common.Functions.Functions.IsEmailAddress(emailAddress)) { employee = blEmp.GetEmployeeByEmail(emailAddress); if (employee != null) { taskPeople = ProcessEmployee(employee); taskPeople.Task = task; task.AssigneesEmployee.Add(taskPeople); } supplier = blSup.GetSupplierByEmail(emailAddress); if (supplier != null) { taskPeople = ProcessSupplier(supplier); taskPeople.Task = task; task.AssigneesSupplier.Add(taskPeople); } if (supplier == null & employee == null) { unknown = blUnk.GetUnknownByEmail(emailAddress); if (unknown != null) { taskPeople = ProcessUnknown(unknown); taskPeople.Task = task; task.AssigneesUnknown.Add(taskPeople); } else { //Create Unknown record unknown = new UnknownObject(); unknown.Email = emailAddress; unknown.State = PROF_IT.Common.Enumerations.ObjectState.Created; blUnk.Save(unknown); taskPeople = ProcessUnknown(unknown); taskPeople.Task = task; task.AssigneesUnknown.Add(taskPeople); } } } } catch (System.Exception exception1) { System.Exception innerException = exception1; throw new System.Exception(MethodBase.GetCurrentMethod().Name, innerException); } }