コード例 #1
0
        public override UserOperationVO ReadRecord(System.Data.SqlServerCe.SqlCeDataReader reader)
        {
            UserOperationVO result = new UserOperationVO();

            result.Id = reader.GetInt32(reader.GetOrdinal(idColumnName));
            int userId      = reader.GetInt32(reader.GetOrdinal(userOperationUserId));
            int operationId = reader.GetInt32(reader.GetOrdinal(userOperationOperationId));

            result.User      = firstTableDAO.GetItem(userId);
            result.Operation = secondTableDAO.GetItem(operationId);
            firstTableDAO.CloseConnection();
            secondTableDAO.CloseConnection();

            return(result);
        }
コード例 #2
0
        public override FileVO ReadRecord(System.Data.SqlServerCe.SqlCeDataReader reader)
        {
            FileVO result = new FileVO();

            result.Id   = reader.GetInt32(reader.GetOrdinal(idColumnName));
            result.Name = reader[fileName].ToString();
            DocumentDAO ddao = new DocumentDAO();

            result.Document = ddao.GetItem(reader.GetInt32(reader.GetOrdinal(fileDocumentId)));
            ddao.CloseConnection();
            result.Type             = (FileVO.FileType)reader.GetInt16(reader.GetOrdinal(fileType));
            result.AdditionDateTime = reader.GetDateTime(reader.GetOrdinal(fileAdditionDate));

            return(result);
        }
コード例 #3
0
        public override DocumentCategoryVO ReadRecord(System.Data.SqlServerCe.SqlCeDataReader reader)
        {
            DocumentCategoryVO result = new DocumentCategoryVO();

            result.Id = reader.GetInt32(reader.GetOrdinal(idColumnName));
            int documentId = reader.GetInt32(reader.GetOrdinal(documentCategoryDocumentId));
            int categoryId = reader.GetInt32(reader.GetOrdinal(documentCategoryCategoryId));

            result.Document = firstTableDAO.GetItem(documentId);
            result.Category = secondTableDAO.GetItem(categoryId);
            firstTableDAO.CloseConnection();
            secondTableDAO.CloseConnection();

            return(result);
        }
コード例 #4
0
        public override LogEntryVO ReadRecord(System.Data.SqlServerCe.SqlCeDataReader reader)
        {
            LogEntryVO result = new LogEntryVO();

            result.Id          = reader.GetInt32(reader.GetOrdinal(idColumnName));
            result.DateTime    = reader.GetDateTime(reader.GetOrdinal(logEntryDateTime));
            result.Description = reader[logEntryDescription].ToString();
            int userId      = reader.GetInt32(reader.GetOrdinal(logEntryUserId));
            int operationId = reader.GetInt32(reader.GetOrdinal(logEntryOperationId));

            result.User      = firstTableDAO.GetItem(userId);
            result.Operation = secondTableDAO.GetItem(operationId);

            firstTableDAO.CloseConnection();
            secondTableDAO.CloseConnection();

            return(result);
        }
コード例 #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SqlServerDataReader"/> class.
 /// </summary>
 /// <param name="dataReader">The data reader.</param>
 public SqlCeDataReaderHelper(System.Data.SqlServerCe.SqlCeDataReader dataReader) : base(dataReader)
 {
 }