public virtual CountersDataSet.CountersDataTable GetData() { this.Adapter.SelectCommand = this.CommandCollection[0]; CountersDataSet.CountersDataTable dataTable = new CountersDataSet.CountersDataTable(); this.Adapter.Fill(dataTable); return(dataTable); }
public List <CounterInfo> GetCounters() { List <CounterInfo> counters = new List <CounterInfo>(); try { using (Counters.Dalc.CountersDataAccess countersDataAccess = new Counters.Dalc.CountersDataAccess()) { CountersDataSet.CountersDataTable table = countersDataAccess.GetCounters(); foreach (CountersDataSet.CountersRow r in table) { CounterInfo counter = new CounterInfo(); counter.Id = r.id; counter.CounterValue = r.value; counters.Add(counter); } } } catch (InvalidOperationException ex) { throw new FaultException(ex.Message); } return(counters); }
public virtual CountersDataSet.CountersDataTable GetDataById(int id) { this.Adapter.SelectCommand = this.CommandCollection[1]; this.Adapter.SelectCommand.Parameters[0].Value = ((int)(id)); CountersDataSet.CountersDataTable dataTable = new CountersDataSet.CountersDataTable(); this.Adapter.Fill(dataTable); return(dataTable); }
public virtual int Fill(CountersDataSet.CountersDataTable dataTable) { this.Adapter.SelectCommand = this.CommandCollection[0]; if ((this.ClearBeforeFill == true)) { dataTable.Clear(); } int returnValue = this.Adapter.Fill(dataTable); return(returnValue); }
public List <CounterInfo> GetCounters() { List <CounterInfo> counters = new List <CounterInfo>(); using (Counters.Dalc.CountersDataAccess countersDataAccess = new Counters.Dalc.CountersDataAccess()) { CountersDataSet.CountersDataTable table = countersDataAccess.GetCounters(); foreach (CountersDataSet.CountersRow r in table) { CounterInfo counter = new CounterInfo(); counter.Id = r.id; counter.CounterValue = r.value; counters.Add(counter); } } return(counters); }
public virtual int Update(CountersDataSet.CountersDataTable dataTable) { return(this.Adapter.Update(dataTable)); }