Example #1
0
        public static IList <PdbUploadRevision> GetUploadRevisions(UploadTypes type)
        {
            var crit = new DaoCriteria();

            crit.Expressions.Add(new EqualExpression("Type", type.ToString()));
            crit.Orders.Add(new SortOrder("Date", SortType.Desc));
            crit.Limit = MaxRevisionsReturned;

            var revisions = _urDao.Get(crit);

            return(revisions);
        }
Example #2
0
        public static void AddUploadRevision(UploadTypes type, String data, User u)
        {
            var ur = new PdbUploadRevision
            {
                Type   = type.ToString(),
                Data   = data,
                Date   = DateTime.Now,
                UserId = u.Id
            };

            _urDao.Insert(ur);
        }