public StoriesCollection<Stories> GetStories(string sortExpression, Int32 maximumRows, Int32 startRowIndex, string categoryValue, string statusValue) { StoriesCollection<Stories> _stories = new StoriesCollection<Stories>(this.ConnectionString); _stories.LitePopulate(_stories.CreateArgumentList(sortExpression,maximumRows,startRowIndex, categoryValue, statusValue), false, null); return _stories; }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { String _catId = Request.QueryString["source"]; StoryCategoriesCollection<StoryCategories> _cat = null; StoryCategories _st = null; if (!String.IsNullOrEmpty(_catId)) { _cat = PortalCacheFactory.GetStoryCategory(); _st = (StoryCategories)_cat.FindByID(_catId); if (_st == null) { _st = (StoryCategories)_cat[0]; } //lbl_Categoty.Text = _st.Description; tText.Text = "so.addVariable(\"text\",\"STORIES FROM THE TOP - <font size='22'>" + _st.Description.ToUpper() + "</font>\")"; hid_Category.Value = _st.ID.ToString(); hid_Status.Value = ((Int32)Enums.enumStatuses.Active).ToString(); } else { _cat = PortalCacheFactory.GetStoryCategory(); _st = ((StoryCategories)_cat[0]); //lbl_Categoty.Text = _st.Description; tText.Text = "so.addVariable(\"text\",\"STORIES FROM THE TOP - <font size='16'>" + _st.Description + "</font>\")"; } StoriesCollection<Stories> _coll = new StoriesCollection<Stories>(this.ConnectionString); _coll.PopulateFixedRecords(_coll.CreateArgListForFixedRecords(dgStories.PageSize, _st.ID.ToString(), Convert.ToInt32(Enums.enumStatuses.Active).ToString())); dgStories.DataSource = _coll; dgStories.DataBind(); } }
public Int32 GetStoriesCount(string sortExpression, Int32 maximumRows, Int32 startRowIndex, string categoryValue, string statusValue) { StoriesCollection<Stories> _stories = new StoriesCollection<Stories>(this.ConnectionString); return _stories.GetTotalByArgList(_stories.CreateArgumentList(sortExpression, maximumRows, startRowIndex, categoryValue, statusValue)); }
public StoriesCollection<Stories> GetStories(Int32 maximumRows, String categoryValue, String statusValue) { StoriesCollection<Stories> _st = new StoriesCollection<Stories>(this.ConnectionString); _st.PopulateFixedRecords(_st.CreateArgListForFixedRecords(maximumRows, categoryValue, statusValue)); return _st; }