private void UpdateAuctionsList(DateTime fromDate, DateTime toDate, int site, int statusId, int traderId, string searchText = null) { AppJournal.Write("Auctions List", "Update get auctions and check new orders from base", true); try { if (string.IsNullOrEmpty(searchText)) { AuctionsList = DataBaseClient.ReadAuctions(fromDate.AddDays(-1), toDate, site, statusId, traderId); } else { AuctionsList = DataBaseClient.ReadAuctions(fromDate.AddDays(-1), toDate, site, statusId, traderId, searchText); } } catch (Exception ex) { AppJournal.Write("Auctions List", "Get auctions list from base error: " + ex.ToString(), true); } try { NewOrders = DataBaseClient.GetOrders(site, 1); } catch (Exception ex) { AppJournal.Write("Orders List", "Get new orders list from error: " + ex.ToString(), true); } if (NewOrders.Count > 0) { NewOrdersVis = System.Windows.Visibility.Visible; } else { NewOrdersVis = System.Windows.Visibility.Collapsed; } }