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