Пример #1
0
        public TaskPeopleObjectCollection GetAll()
        {
            TaskPeopleObjectCollection parameters = new TaskPeopleObjectCollection();
            QueryBuilder builder;

            try
            {
                builder = new QueryBuilder();
                builder.Append(this.BaseQuery(false, 0));
                parameters = TaskPeopleConvertor.DataTableToCollection(this.ExecuteDataSet(builder.Query, false).Tables[0]);
            }
            catch (System.Exception exception1)
            {
                throw new Exception(MethodBase.GetCurrentMethod().Name, exception1);
            }
            return(parameters);
        }
Пример #2
0
        public TaskPeopleObjectCollection GetReporterByTaskID(Guid taskID)
        {
            TaskPeopleObjectCollection taskPeoples = new TaskPeopleObjectCollection();
            QueryBuilder builder;

            try
            {
                builder = new QueryBuilder();
                builder.Append(this.BaseQuery(false, 0));
                builder.AppendWhereString(TaskPeopleObject.TASK_ID, taskID.ToString(), QueryBuilder.ComparisonOperators.Equal, QueryBuilder.ParameterLocation.FIRST);
                builder.AppendWhereBoolean(TaskPeopleObject.REPORTER, true, QueryBuilder.ParameterLocation.LAST);
                taskPeoples = TaskPeopleConvertor.DataTableToCollection(this.ExecuteDataSet(builder.Query, false).Tables[0]);
            }
            catch (System.Exception exception1)
            {
                throw new Exception(MethodBase.GetCurrentMethod().Name, exception1);
            }
            return(taskPeoples);
        }
Пример #3
0
        public TaskPeopleObjectCollection GetByEmployee(EmployeeObject employee)
        {
            TaskPeopleObjectCollection taskPeoples = new TaskPeopleObjectCollection();
            QueryBuilder builder;

            try
            {
                builder = new QueryBuilder();
                builder.Append(this.BaseQuery(false, 0));
                builder.AppendWhereString(TaskPeopleObject.EMP_ID, employee.EmpID.ToString(), QueryBuilder.ComparisonOperators.Equal, QueryBuilder.ParameterLocation.FIRST);
                builder.Append("AND " + TaskPeopleObject.EMP_ID + " is not null ");
                builder.Append("AND " + TaskObject.TASK_ID + " is not null ");
                builder.AppendWhereBoolean(TaskPeopleObject.ASSIGNEE, true, QueryBuilder.ParameterLocation.LAST);
                taskPeoples = TaskPeopleConvertor.DataTableToCollection(this.ExecuteDataSet(builder.Query, false).Tables[0]);
            }
            catch (System.Exception exception1)
            {
                throw new Exception(MethodBase.GetCurrentMethod().Name, exception1);
            }
            return(taskPeoples);
        }