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