public static TaskPeopleObject TaskPeopleRowToObject(DataRow taskPeople) { TaskPeopleObject obj = new TaskPeopleObject(); try { if (taskPeople != null) { obj.TpeopID = RowFunctions.GetValueFromRowToGuid(taskPeople, TaskPeopleObject.TPEOP_ID, true, DataRowVersion.Current); obj.Employee = EmployeeConvertor.EmployeeRowToObject(taskPeople, EmployeeObject.TABLE); obj.Supplier = SupplierConvertor.SupplierRowToObject(taskPeople); obj.Customer = CustomerConvertor.CustomerRowToObject(taskPeople); obj.Unknown = UnknownConvertor.UnknownRowToObject(taskPeople); obj.Assignee = RowFunctions.GetValueFromRowToBoolean(taskPeople, TaskPeopleObject.ASSIGNEE, true, DataRowVersion.Current); obj.Reporter = RowFunctions.GetValueFromRowToBoolean(taskPeople, TaskPeopleObject.REPORTER, true, DataRowVersion.Current); obj.Task = TaskConvertor.TaskRowToObject(taskPeople); return(obj); } obj = null; } catch (System.Exception exception1) { Exception innerException = exception1; throw new Exception(MethodBase.GetCurrentMethod().Name, innerException); } return(obj); }
public TaskObjectCollection GetFilter(string dateFrom, string dateTo, string description) { TaskObjectCollection tasks = new TaskObjectCollection(); QueryBuilder builder; try { builder = new QueryBuilder(); builder.Append(this.BaseQuery(false, 0)); if (dateFrom != null) { builder.AppendWhereString(TaskObject.CREATION_DATE, dateFrom, QueryBuilder.ComparisonOperators.GreaterAndEqual, QueryBuilder.ParameterLocation.FIRST); } if (dateTo != null) { builder.AppendWhereString(TaskObject.CREATION_DATE, dateTo, QueryBuilder.ComparisonOperators.SmallerAndEqual, QueryBuilder.ParameterLocation.MIDDLE); } if (description != "") { builder.AppendWhereString(TaskObject.DESCRIPTION, description, QueryBuilder.ComparisonOperators.Like, QueryBuilder.ParameterLocation.LAST); } builder.AppendOrderBy(TaskObject.CREATION_DATE, QueryBuilder.OrderByType.ASC, QueryBuilder.ParameterLocation.FIRST_LAST); tasks = TaskConvertor.DataTableToCollection(this.ExecuteDataSet(builder.Query, false).Tables[0]); } catch (System.Exception exception1) { throw new Exception(MethodBase.GetCurrentMethod().Name, exception1); } return(tasks); }
public TaskObjectCollection GetAll() { TaskObjectCollection tasks = new TaskObjectCollection(); QueryBuilder builder; try { builder = new QueryBuilder(); builder.Append(this.BaseQuery(false, 0)); builder.AppendOrderBy(TaskObject.CREATION_DATE, QueryBuilder.OrderByType.ASC, QueryBuilder.ParameterLocation.FIRST_LAST); tasks = TaskConvertor.DataTableToCollection(this.ExecuteDataSet(builder.Query, false).Tables[0]); } catch (System.Exception exception1) { throw new Exception(MethodBase.GetCurrentMethod().Name, exception1); } return(tasks); }
public TaskObjectCollection GetActive() { TaskObjectCollection tasks = new TaskObjectCollection(); QueryBuilder builder; try { builder = new QueryBuilder(); builder.Append(this.BaseQuery(false, 0)); builder.AppendWhereInteger(TaskObject.STATUS, (int)TIS.Framework.Common.Enumeration.Task.Status.Open, QueryBuilder.ParameterLocation.FIRST_LAST); builder.AppendOrderBy(TaskObject.CREATION_DATE, QueryBuilder.OrderByType.ASC, QueryBuilder.ParameterLocation.FIRST_LAST); tasks = TaskConvertor.DataTableToCollection(this.ExecuteDataSet(builder.Query, false).Tables[0]); } catch (System.Exception exception1) { Exception innerException = exception1; throw new Exception(MethodBase.GetCurrentMethod().Name, innerException); } return(tasks); }
public static TaskScheduleObject TaskScheduleRowToObject(DataRow taskSchedule) { TaskScheduleObject obj = new TaskScheduleObject(); try { if (taskSchedule != null) { obj.TschedID = RowFunctions.GetValueFromRowToGuid(taskSchedule, TaskScheduleObject.TSCHED_ID, true, DataRowVersion.Current); obj.Schedule = ScheduleConvertor.ScheduleRowToObject(taskSchedule); obj.Task = TaskConvertor.TaskRowToObject(taskSchedule); return(obj); } obj = null; } catch (System.Exception exception1) { Exception innerException = exception1; throw new Exception(MethodBase.GetCurrentMethod().Name, innerException); } return(obj); }