public List <OSAEStateHistory> GetStateHistory(string objName, string from, string to) { List <OSAEStateHistory> list = new List <OSAEStateHistory>(); DataSet ds = OSAEObjectStateManager.ObjectStateHistoryGet(objName, from, to); foreach (DataRow dr in ds.Tables[0].Rows) { OSAEStateHistory sh = new OSAEStateHistory(); sh.obj = dr["object_name"].ToString(); sh.state = dr["state_label"].ToString(); sh.datetime = (double)Common.GetJavascriptTimestamp(DateTime.Parse(dr["history_timestamp"].ToString())); list.Add(sh); } return(list); }
public List<OSAEStateHistory> GetStateHistory(string objName, string from, string to) { List<OSAEStateHistory> list = new List<OSAEStateHistory>(); DataSet ds = OSAEObjectStateManager.ObjectStateHistoryGet(objName, from, to); foreach (DataRow dr in ds.Tables[0].Rows) { OSAEStateHistory sh = new OSAEStateHistory(); sh.obj = dr["object_name"].ToString(); sh.state = dr["state_label"].ToString(); sh.datetime = (double)Common.GetJavascriptTimestamp(DateTime.Parse(dr["history_timestamp"].ToString())); list.Add(sh); } return list; }