public void Include(TradeListInfo info) { mCount += info.Count; mPayment += info.Payment; mBuyerNum += info.BuyerNum; }
private void OnTodayDataClicked(object sender, EventArgs e) { int checkDayNum = (int)numericUpDown1.Value; DateTime select = dateTimePicker1.Value.Date; DateTime end = select + new TimeSpan(1, 0, 0, 0); DateTime begin = end - new TimeSpan(checkDayNum, 0, 0, 0); List<Trade> searchTrades = TopClientHelper.GetTradeList("WAIT_BUYER_CONFIRM_GOODS", begin, end, "consign_time"); searchTrades.AddRange(TopClientHelper.GetTradeList("TRADE_FINISHED", begin, end, "consign_time")); List<Trade> todayTrades = new List<Trade>(); foreach (Trade trade in searchTrades) { if (String.IsNullOrEmpty(trade.ConsignTime)) continue; DateTime consignTime = DateTime.Parse(trade.ConsignTime); if (consignTime > select && consignTime < end) todayTrades.Add(trade); } TradeListInfo todayInfo = new TradeListInfo(); todayInfo.FillData(todayTrades); propertyGrid2.SelectedObject = todayInfo; }