private void initData() { p_BannerIndex = 0;//reset even after postbacks p_dtTopAnnouncement = csql.getTopAnnoucements("SmartConcepcion"); p_dtAnnouncement = csql.getAnnouncements("SmartConcepcion", p_PageSize, 0, p_BrgyID, "", ""); loadGridView(gvAnnouncements, p_dtAnnouncement); loadListview(lvAnnouncement, p_dtTopAnnouncement); upAnnouncements.Update(); }
void loadannouncementProfile() { long? selected_announcement_type = null; if (ddFilterannouncementType.SelectedValue != "-1") selected_announcement_type = convert_long(ddFilterannouncementType.SelectedValue, false); dttemp = csql.getAnnouncements("SmartConcepcion", gvannouncementProfiles.PageSize, p_PageIndex, p_BrgyID, ddFilterannouncementType.SelectedValue,txtUserSearch.Text); gvannouncementProfiles.PageIndex = p_PageIndex; if (dttemp.Rows.Count > 0) { gvannouncementProfiles.VirtualItemCount = (int)dttemp.Rows[0]["reccount"]; loadGridView(gvannouncementProfiles, dttemp); upannouncement.Update(); } }
private void initData() { p_BannerIndex = 0; p_dtTopAnnouncement = csql.getTopAnnoucements("SmartConcepcion"); p_dtAnnouncement = csql.getAnnouncements("SmartConcepcion", p_PageSize, p_PageIndex, p_BrgyID, "", ""); loadGridView(gvAnnouncements, p_dtAnnouncement); loadGridView(gvTopAnnouncement, p_dtTopAnnouncement); if (p_dtAnnouncement.Rows.Count < gvAnnouncements.PageSize) { btnNext.Visible = false; btnPrev.Visible = false; } else { btnNext.Visible = true; btnPrev.Visible = true; } upAnnouncements.Update(); }