void GetNews(string order) { DdlListShowItem.SelectedValue = NumberShowItem; condition = DataExtension.AndConditon( "VIAPP = 'QLDDDV'", ItemsTSql.GetByLang(language)); condition += " AND IIENABLE <> '2' "; if (tbKeySearch.Text.Length > 0) { condition += " AND " + SearchTSql.GetSearchMathedCondition(tbKeySearch.Text, ItemsColumns.ViauthorColumn); } if (tbTitleSearch.Text.Length > 0) { condition += " AND " + SearchTSql.GetSearchMathedCondition(tbTitleSearch.Text, ItemsColumns.VititleColumn); } if (order.Length > 0) { orderBy = order; } else { orderBy = CookieExtension.GetCookiesSort(sortCookiesName); if (orderBy.Length < 1) { orderBy = " DCREATEDATE DESC "; } } DataSet ds = new DataSet(); ds = GroupsItems.GetAllDataPagging(p, DdlListShowItem.SelectedValue, condition, orderBy); DataTable dt = new DataTable(); dt = ds.Tables[1]; string key = tbKeySearch.Text + "&name=" + tbTitleSearch.Text; LtPagging.Text = PagingExtension.SpilitPages(Convert.ToInt32(dt.Rows[0]["TotalRows"]), Convert.ToInt16(NumberShowItem), Convert.ToInt32(p), LinkAdmin.UrlAdmin(CodeApplications.Service, "QuanLyDonDatDichVu", "", key, NumberShowItem), "currentPS", "otherPS", "firstPS", "lastPS", "previewPS", "nextPS"); LtPaggingTop.Text = LtPagging.Text; rp_mn_users.DataSource = ds.Tables[0]; rp_mn_users.DataBind(); }
void GetParentCate() { DataTable dt = new DataTable(); fields = "*"; condition = DataExtension.AndConditon( ItemsTSql.GetByLang(language), ItemsTSql.GetByApp(appCate), " IIENABLE <> 2 "); orderBy = ItemsColumns.VititleColumn; dt = Items.GetItems("", fields, condition, orderBy); ddlCateSearch.Items.Add(new ListItem("Chọn tour cần xem bình luận", "")); for (int i = 0; i < dt.Rows.Count; i++) { ddlCateSearch.Items.Add(new ListItem(dt.Rows[i][ItemsColumns.VititleColumn].ToString(), dt.Rows[i][ItemsColumns.IidColumn].ToString())); } ddlCateSearch.SelectedValue = iid; }
void GetBookings(string order) { string condition = DataExtension.AndConditon( ItemsTSql.GetByApp(app), ItemsTSql.GetByLang(language), ItemsColumns.IienableColumn + "<>2" ); if (order.Length > 0) { orderBy = order; } else { orderBy = CookieExtension.GetCookiesSort(sortCookiesName); if (orderBy.Length < 1) { orderBy = ItemsColumns.DicreatedateColumn + " desc "; } } DataSet ds = new DataSet(); ds = Items.GetItemsPagging(p, DdlListShowItem.SelectedValue, condition, orderBy); DataTable dt = new DataTable(); dt = ds.Tables[1]; LtPagging.Text = PagingExtension.SpilitPages(Convert.ToInt32(dt.Rows[0]["TotalRows"]), Convert.ToInt16(DdlListShowItem.SelectedValue), Convert.ToInt32(p), LinkAdmin.UrlAdmin(CodeApplications.Tour, TypePage.Booking + "02", ddlCateSearch.SelectedValue, "", NumberShowItem), "currentPS", "otherPS", "firstPS", "lastPS", "previewPS", "nextPS"); LtPaggingTop.Text = LtPagging.Text; rp_mn_users.DataSource = ds.Tables[0]; rp_mn_users.DataBind(); }