Exemplo n.º 1
0
        public MemoObjectCollection GetAll()
        {
            MemoObjectCollection memos = new MemoObjectCollection();
            QueryBuilder         builder;

            try
            {
                builder = new QueryBuilder();
                builder.Append(this.BaseQuery(false, 0));
                builder.AppendOrderBy(MemoObject.DATETIME, QueryBuilder.OrderByType.DESC, QueryBuilder.ParameterLocation.FIRST_LAST);
                memos = MemoConvertor.DataTableToCollection(this.ExecuteDataSet(builder.Query, false).Tables[0]);
            }
            catch (System.Exception exception1)
            {
                throw new Exception(MethodBase.GetCurrentMethod().Name, exception1);
            }
            return(memos);
        }
Exemplo n.º 2
0
        public MemoObjectCollection GetMemosByMaintenanceID(MaterialObject material)
        {
            MemoObjectCollection memos = new MemoObjectCollection();
            QueryBuilder         builder;

            try
            {
                builder = new QueryBuilder();
                builder.Append(this.BaseQuery(false, 0));
                builder.AppendWhereString(MemoObject.MAT_ID, material.MatID.ToString(), QueryBuilder.ComparisonOperators.Equal, QueryBuilder.ParameterLocation.FIRST);
                builder.Append("AND " + MemoObject.MAT_ID + " is not null ");
                memos = MemoConvertor.DataTableToCollection(this.ExecuteDataSet(builder.Query, false).Tables[0]);
            }
            catch (System.Exception exception1)
            {
                throw new Exception(MethodBase.GetCurrentMethod().Name, exception1);
            }
            return(memos);
        }