private DataTable GetQueryData(bool isDownload) { int totalcnt = 0; DataTable table = null; BCtrl_EventItem bll = new BCtrl_EventItem(); if (ShowFlag == "0") { EventItemSearchEntity entity = new EventItemSearchEntity(); entity.Title = this.Title; entity.FirstTypeID = !string.IsNullOrEmpty(this.FirstTypeID) ? int.Parse(FirstTypeID) : -1; entity.SecondTypeID = !string.IsNullOrEmpty(SecondTypeID) ? int.Parse(SecondTypeID) : -1; entity.StartTime = !string.IsNullOrEmpty(this.StartTime) ? DateTime.Parse(this.StartTime) : (DateTime?)null; entity.EndTime = !string.IsNullOrEmpty(this.EndTime) ? DateTime.Parse(this.EndTime) : (DateTime?)null; entity.Recommend = !string.IsNullOrEmpty(Recommend) ? int.Parse(Recommend) : -1; entity.Advert = !string.IsNullOrEmpty(Advert) ? int.Parse(Advert) : -1; entity.SingleGroup = !string.IsNullOrEmpty(SingleGroup) ? int.Parse(SingleGroup) : -1; if (Subarticle == "0") { entity.SubarticleState = 0; } else if (Subarticle == "1") { entity.SubarticleState = 1; } entity.PageSize = base.PageSize; entity.PageIndex = base.PageIndex; entity.UseDBPagination = !isDownload; table = bll.QueryViewEventItemTable(entity, out totalcnt); } else if (ShowFlag == "1") { table = bll.QueryViewEventItemTableByIDs(ArticleIds, base.PageIndex, base.PageSize, out totalcnt); } else if (ShowFlag == "2") { string strWhere = string.Empty; strWhere = " (FirstTypeID !=0 AND CalendarTypeID !=0) AND EventItemState =1"; table = bll.QueryViewEventItemTable(base.PageIndex, base.PageSize, " EventItemID DESC ", strWhere, out totalcnt); } else if (ShowFlag == "3") { string strWhere = string.Empty; strWhere = " EventItemState =1"; table = bll.QueryViewEventItemTable(base.PageIndex, base.PageSize, " EventItemID DESC ", strWhere, out totalcnt); } base.TotalRecords = totalcnt; return(table); }
private DataTable GetQueryData(bool isDownload) { BCtrl_EventItem bll = new BCtrl_EventItem(); int totalcnt = 0; EventItemSearchEntity entity = new EventItemSearchEntity(); entity.Title = this.Title; entity.FirstTypeID = !string.IsNullOrEmpty(this.FirstTypeID) ? int.Parse(FirstTypeID) : -1; entity.SecondTypeID = !string.IsNullOrEmpty(SecondTypeID) ? int.Parse(SecondTypeID):-1; entity.StartTime = !string.IsNullOrEmpty(this.StartTime) ? DateTime.Parse(this.StartTime): (DateTime?)null; entity.EndTime = !string.IsNullOrEmpty(this.EndTime) ? DateTime.Parse(this.EndTime) : (DateTime?)null; entity.Recommend = !string.IsNullOrEmpty(Recommend) ? int.Parse(Recommend):-1; entity.Advert = !string.IsNullOrEmpty(Advert) ? int.Parse(Advert) : -1; entity.SingleGroup = !string.IsNullOrEmpty(SingleGroup) ? int.Parse(SingleGroup) : -1; if (Subarticle == "0") { entity.SubarticleState = 0; } else if (Subarticle == "1") { entity.SubarticleState = 1; } entity.PageSize = base.PageSize; entity.PageIndex = base.PageIndex; entity.UseDBPagination = !isDownload; DataTable table = bll.QueryViewEventItemTable(entity, out totalcnt); base.TotalRecords = totalcnt; return(table); }
private DataTable GetQueryData(bool isDownload) { BCtrl_EventItem bll = new BCtrl_EventItem(); int totalcnt = 0; EventItemSearchEntity entity = new EventItemSearchEntity(); entity.Title = this.Title; entity.FirstTypeID = !string.IsNullOrEmpty(this.FirstTypeID) ? int.Parse(FirstTypeID) : -1; entity.SecondTypeID = !string.IsNullOrEmpty(SecondTypeID) ? int.Parse(SecondTypeID) : -1; entity.StartTime = !string.IsNullOrEmpty(this.StartTime) ? DateTime.Parse(this.StartTime) : (DateTime?)null; entity.EndTime = !string.IsNullOrEmpty(this.EndTime) ? DateTime.Parse(this.EndTime) : (DateTime?)null; entity.Recommend = !string.IsNullOrEmpty(Recommend) ? int.Parse(Recommend) : -1; entity.Advert = 1; entity.IsEnableAdvertOrder = true; entity.DayTime = !string.IsNullOrEmpty(this.DayTime) ? DateTime.Parse(this.DayTime) : (DateTime?)null; entity.PageSize = base.PageSize; entity.PageIndex = base.PageIndex; entity.UseDBPagination = !isDownload; DataTable table = bll.QueryViewEventItemTable(entity, out totalcnt); base.TotalRecords = totalcnt; return(table); }