/// <summary> /// Loads a collection of InvtBatchTXF_Log objects from the database. /// </summary> /// <returns>A collection containing all of the InvtBatchTXF_Log objects in the database.</returns> public static InvtBatchTXF_LogCollection LoadCollection(string spName, SqlParameter[] parms) { InvtBatchTXF_LogCollection result = new InvtBatchTXF_LogCollection(); using (SqlDataReader reader = SqlHelper.Default.ExecuteReader(spName, parms)) { while (reader.Read()) { InvtBatchTXF_Log tmp = new InvtBatchTXF_Log(); tmp.LoadFromReader(reader); result.Add(tmp); } } return(result); }
/// <summary> /// Loads a InvtBatchTXF_Log object from the database using the given where clause /// </summary> /// <param name="whereClause">The filter expression for the query</param> /// <returns>A InvtBatchTXF_Log object</returns> public static InvtBatchTXF_Log LoadWhere(string whereClause) { SqlParameter[] parameterValues = new SqlParameter[] { new SqlParameter("@WhereClause", whereClause) }; using (SqlDataReader reader = SqlHelper.Default.ExecuteReader("spInvtBatchTXF_Log_SelAll", parameterValues)) { if (reader.Read()) { InvtBatchTXF_Log result = new InvtBatchTXF_Log(); result.LoadFromReader(reader); return(result); } else { return(null); } } }
/// <summary> /// Loads a InvtBatchTXF_Log object from the database using the given LogId /// </summary> /// <param name="logId">The primary key value</param> /// <returns>A InvtBatchTXF_Log object</returns> public static InvtBatchTXF_Log Load(Guid logId) { SqlParameter[] parameterValues = new SqlParameter[] { new SqlParameter("@LogId", logId) }; using (SqlDataReader reader = SqlHelper.Default.ExecuteReader("spInvtBatchTXF_Log_SelRec", parameterValues)) { if (reader.Read()) { InvtBatchTXF_Log result = new InvtBatchTXF_Log(); result.LoadFromReader(reader); return(result); } else { return(null); } } }