예제 #1
0
		protected override void OnSetUp()
		{
			session = OpenSession();
			tran = session.BeginTransaction();

			// save some data
			Document doc = new Document(1, "test doc");
			Image img = new Image(1, doc, "c:\a.jpg");
			Paragraph para = new Paragraph(2, doc, "Arial");
			Page p1 = new Page(1, doc);
			p1.IsActive = true;
			Page p2 = new Page(2, doc);
			p2.IsActive = false;
			Review r = new Review(10, doc, "this is a good document"); // this id is 10 on purpose (to be != docId)

			session.Save(doc);
			session.Save(img);
			session.Save(para);
			session.Save(p1);
			session.Save(p2);
			session.Save(r);

			session.Flush();
			session.Clear();
		}
예제 #2
0
		public Image(int elementId, Document document, string img)
		{
			this.img = img;
			this.elementId = elementId;
			this.document = document;
		}
예제 #3
0
		public Paragraph(int elementId, Document document, string font)
		{
			this.font = font;
			this.elementId = elementId;
			this.document = document;
		}
예제 #4
0
		public Review(int reviewId, Document document, string content)
		{
			this.reviewId = reviewId;
			this.document = document;
			this.content = content;
		}
예제 #5
0
		public Page(int pageId, Document document)
		{
			this.pageId = pageId;
			this.document = document;
			pages = new List<Page>();
		}
예제 #6
0
		public Page(int pageId, Document document)
		{
			this.pageId = pageId;
			this.document = document;
			pages = new ArrayList();
		}