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