//情報の更新をする。 public override void UpdateCounts() { SearchItemList = EpgEventList.ToSearchList(true); SearchCount = (uint)EpgEventList.Count(item => item.IsOver() == false); ReseveItemList = SearchItemList.GetReserveList(); base.UpdateCounts(); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { DataTable dt = new DataTable(); SearchItemList.DataSource = dt; SearchItemList.DataBind(); UpdateTotalPrice(dt); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { DataTable lists = new DataTable(); SearchItemList.DataSource = lists; SearchItemList.DataBind(); //更新总价 UpdateTotalPrice(lists); } }
protected void SubmitButtom_Click(object sender, EventArgs e) { int userId = Int32.Parse(Session["UserID"].ToString()); string keywords = this.Keywords.Text.Trim().Replace("%", ""); if (keywords == "") { Utility.Alert(this, "关键字不能为空!"); return; } DataTable dt = ItemAccess.GetItemListByKeywords(keywords, userId); SearchItemList.DataSource = dt; SearchItemList.DataBind(); UpdateTotalPrice(dt); }
private async void SearchExecute(string searchText, ItemType itemType, int page, int pages = 0) { string status = $@"Szukam ""{searchText}"" [{GetItemTypeUserText(itemType)}] ..."; if (page > 0) { status = $@"Ładuje strone {page+1} z {pages} [{GetItemTypeUserText(itemType)}] ..."; } setUserStatus(status); var searchRecord = new SearchItemWebRequest() { SearchPatern = searchText, SearchType = itemType, Page = page, AllPages = pages }; SearchEnable = false; lastItemsSearchResult = await dataRepository.SearchItemWebAsync(searchRecord, (SearchItemList.Count > 0)?!SearchItemList[SearchItemList.Count - 1].RowEven : false, setUserStatus); SearchEnable = true; if (lastItemsSearchResult.Correct) { setUserStatus("Zakończono wyszukiwanie"); if (pages == 0) { SearchItemList.Clear(); } foreach (var item in lastItemsSearchResult.CollectionResult) { SearchItemList.Add(item); } } else { setUserStatus("Wystąpił błąd podczas wyszukiwania."); } }
//搜索按钮 protected void SubmitButtom_Click(object sender, EventArgs e) { int userId = Convert.ToInt32(Session["UserID"]); string keywords = this.Keywords.Text.Trim().Replace("%", ""); if (keywords == "") { Utility.Alert(this, "关键字不能为空!"); return; } ItemTableBLL bll = new ItemTableBLL(); DataTable lists = bll.GetItemListByKeywords(userId, keywords); SearchItemList.DataSource = lists; SearchItemList.DataBind(); //更新总价 UpdateTotalPrice(lists); }