public List <ParamModel> FillAllParamModel(IDataReader idr) { List <ParamModel> models = new List <ParamModel>(); try { while (idr.Read()) { ParamModel model = new ParamModel(); model = FillParamModel(idr, false); models.Add(model); } } catch (Exception ex) { } finally { if (idr != null) { idr.Close(); } } return(models); }
public ParamModel FillParamModel(IDataReader idr, bool close) { ParamModel model = new ParamModel(); model.time = Convert.ToDateTime(idr["time"]); model.value = SetNullDouble(idr["value"]); if (close) { idr.Close(); } return(model); }