示例#1
0
 public HomeController()
 {
     p  = new PageRepository(new News_Agency_Entities());
     pg = new PageGroupRepository(new News_Agency_Entities());
     pc = new PageCommentRepository(new News_Agency_Entities());
     lg = new LoginRepository(new News_Agency_Entities());
 }
示例#2
0
文件: Page.cs 项目: rlefever68/Broobu
 /// <summary>
 /// Adds the page group.
 /// </summary>
 /// <param name="pageGroup">The page group.</param>
 /// <returns>IDomainObject.</returns>
 public IDomainObject AddPageGroup(IPageGroup pageGroup)
 {
     if (pageGroup is DefaultPageGroup)
     {
         return(null);
     }
     return(AddPart(pageGroup));
 }
示例#3
0
 public PageGroupsController()
 {
     pageGroupRepository = new PageGroupRepository(db);
 }
示例#4
0
 public PagesController()
 {
     p  = new PageRepository(new News_Agency_Entities());
     pg = new PageGroupRepository(new News_Agency_Entities());
 }
示例#5
0
 public PagesController(IPages pagess, IPageGroup pageGroup)
 {
     this.pagess    = pagess;
     this.pageGroup = pageGroup;
 }
 public PageGroupsController(IPageGroup pageGroups)
 {
     this.pageGroups = pageGroups;
 }
示例#7
0
		///	<summary> 
		///		This method copy's each database field which is not in the <paramref name="excludedColumns"/> 
		///		from the <paramref name="source"/> interface to this data row.
		/// </summary>
		public void Copy_From_But_Ignore(IPageGroup source, params string[] excludedColumns)
		{
			if (!excludedColumns.Contains(PageGroupsTable.IdCol)) this.Id = source.Id;
			if (!excludedColumns.Contains(PageGroupsTable.NameCol)) this.Name = source.Name;
		}
示例#8
0
		///	<summary> 
		///		This method copy's each database field which is in the <paramref name="includedColumns"/> 
		///		from the <paramref name="source"/> interface to this data row.
		/// </summary>
		public void Copy_From_But_TakeOnly(IPageGroup source, params string[] includedColumns)
		{
			if (includedColumns.Contains(PageGroupsTable.IdCol)) this.Id = source.Id;
			if (includedColumns.Contains(PageGroupsTable.NameCol)) this.Name = source.Name;
		}
示例#9
0
		///	<summary> This method copy's each database field from the <paramref name="source"/> interface to this data row.</summary>
		public void Copy_From(IPageGroup source, bool includePrimaryKey = false)
		{
			if (includePrimaryKey) this.Id = source.Id;
			this.Name = source.Name;
		}
示例#10
0
		///	<summary> This method copy's each database field into the <paramref name="target"/> interface. </summary>
		public void Copy_To(IPageGroup target, bool includePrimaryKey = false)
		{
			if (includePrimaryKey) target.Id = this.Id;
			target.Name = this.Name;
		}
 public showByCountVMsComponents(IPageGroup pageGroup)
 {
     this.pageGroup = pageGroup;
 }
示例#12
0
 public NewsController()
 {
     pageGroupRepository   = new PageGroupRepository(db);
     pageRepository        = new PageRepository(db);
     pageCommentRepository = new PageCommentRepository(db);
 }
 public PageCommentsController()
 {
     pg = new PageGroupRepository(new News_Agency_Entities());
     pa = new PageRepository(new News_Agency_Entities());
     pc = new PageCommentRepository(new News_Agency_Entities());
 }