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);
        }
Exemple #2
0
        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);
            }
        }
        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);
        }