private DataTable cb_Changed() { DataTable dtResults = new DataTable(); if (cbInputMonth.SelectedIndex != 0 && cbInputYear.SelectedIndex != 0 && cbLocation.SelectedIndex != 0) { StatMessage statMessage = new StatMessage() { cpu_name = Environment.MachineName }; foreach (Location mLoc in locations) { if (mLoc.loc_name.ToLower().Contains(cbLocation.GetItemText(cbLocation.SelectedItem).ToLower())) { statMessage.id_loc = mLoc.id; statMessage.location = cbLocation.GetItemText(cbLocation.SelectedItem).ToLower(); } } statMessage.year = cbInputYear.GetItemText(cbInputYear.SelectedItem); statMessage.month = cbInputMonth.GetItemText(cbInputMonth.SelectedItem).ToLower(); statMessage.stat_type = "GetMonthlyStat"; dtResults = apiStatWrapper.GetMonthlyStats(statMessage); } return(dtResults); }
public DataTable ApiGetMonthlyStats(StatMessage statMessage) => apiStatsWrapper.GetMonthlyStats(statMessage);