public ObservableCollection<ChannelOR> SelectChannels(string DeviceID) { string sql = string.Format("select * from t_Channel where DeviceID={0} order by deviceid,ChannelName", DeviceID); DataTable dt = null; try { dt = db.ExecuteQuery(sql); } catch (Exception ex) { throw ex; } ObservableCollection<ChannelOR> _List = new ObservableCollection<ChannelOR>(); foreach (DataRow dr in dt.Rows) { ChannelOR obj = new ChannelOR(dr); _List.Add(obj); } return _List; }
public void Clone(ChannelOR obj) { // Deviceid = obj.Deviceid; // Channelno = obj.Channelno; // Channelname = obj.Channelname; // Value0Name = obj.Value0Name; // Value1Name = obj.Value1Name; // Currentvalue = obj.Currentvalue; // Channelparam = obj.Channelparam; }