private void BindData() { TimeOfDay _th = new TimeOfDay(this.ConnectionString); gv_Themes.DataSource = _th.GetTimeOfDays(Enums.enumStatuses.Active); gv_Themes.DataBind(); TimeOfDayCollection<TimeOfDay> _coll = new TimeOfDayCollection<TimeOfDay>(this.ConnectionString); _coll.AddRange(_th.GetTimeOfDays(Enums.enumStatuses.Inactive)); _coll.AddRange(_th.GetTimeOfDays(Enums.enumStatuses.Pending)); gv_ThemesNotActive.DataSource = _coll; gv_ThemesNotActive.DataBind(); PortalCacheFactory.RefreshTimeOfDay(); }
public TimeOfDayCollection<TimeOfDay> GetTimeOfDays(Enums.enumStatuses status) { TimeOfDayCollection<TimeOfDay> _coll = new TimeOfDayCollection<TimeOfDay>(this.ConnectionString); ArgumentsList _arg = new ArgumentsList(new ArgumentsListItem("Status", Convert.ToInt32(status).ToString())); _coll.LitePopulate(_arg, false, null); return _coll; }