Пример #1
0
        /// <summary>
        /// Loads a collection of InvtBatchADJ_Details objects from the database.
        /// </summary>
        /// <returns>A collection containing all of the InvtBatchADJ_Details objects in the database.</returns>
        public static InvtBatchADJ_DetailsCollection LoadCollection(string spName, SqlParameter[] parms)
        {
            InvtBatchADJ_DetailsCollection result = new InvtBatchADJ_DetailsCollection();

            using (SqlDataReader reader = SqlHelper.Default.ExecuteReader(spName, parms))
            {
                while (reader.Read())
                {
                    InvtBatchADJ_Details tmp = new InvtBatchADJ_Details();
                    tmp.LoadFromReader(reader);
                    result.Add(tmp);
                }
            }
            return(result);
        }
Пример #2
0
 /// <summary>
 /// Loads a InvtBatchADJ_Details object from the database using the given where clause
 /// </summary>
 /// <param name="whereClause">The filter expression for the query</param>
 /// <returns>A InvtBatchADJ_Details object</returns>
 public static InvtBatchADJ_Details LoadWhere(string whereClause)
 {
     SqlParameter[] parameterValues = new SqlParameter[] { new SqlParameter("@WhereClause", whereClause) };
     using (SqlDataReader reader = SqlHelper.Default.ExecuteReader("spInvtBatchADJ_Details_SelAll", parameterValues))
     {
         if (reader.Read())
         {
             InvtBatchADJ_Details result = new InvtBatchADJ_Details();
             result.LoadFromReader(reader);
             return(result);
         }
         else
         {
             return(null);
         }
     }
 }
Пример #3
0
 /// <summary>
 /// Loads a InvtBatchADJ_Details object from the database using the given DetailsId
 /// </summary>
 /// <param name="detailsId">The primary key value</param>
 /// <returns>A InvtBatchADJ_Details object</returns>
 public static InvtBatchADJ_Details Load(Guid detailsId)
 {
     SqlParameter[] parameterValues = new SqlParameter[] { new SqlParameter("@DetailsId", detailsId) };
     using (SqlDataReader reader = SqlHelper.Default.ExecuteReader("spInvtBatchADJ_Details_SelRec", parameterValues))
     {
         if (reader.Read())
         {
             InvtBatchADJ_Details result = new InvtBatchADJ_Details();
             result.LoadFromReader(reader);
             return(result);
         }
         else
         {
             return(null);
         }
     }
 }