/// <summary> /// Populates the fields of a single objects from the columns found in an open reader. /// </summary> /// <param name="obj" type="INVAdjustStock">Object of INVAdjustStock to populate</param> /// <param name="rdr" type="IDataReader">An object that implements the IDataReader interface</param> /// /// <remarks> /// /// <RevisionHistory> /// Author Date Description /// DLGenerator 4/4/2015 1:32:30 PM Created function /// /// </RevisionHistory> /// /// </remarks> /// internal static void PopulateObjectFromReader(INVAdjustStockBase obj, IDataReader rdr) { obj.AdjustStockID = rdr.GetInt32(rdr.GetOrdinal(INVAdjustStockFields.AdjustStockID)); obj.ProductID = rdr.GetInt32(rdr.GetOrdinal(INVAdjustStockFields.ProductID)); if (!rdr.IsDBNull(rdr.GetOrdinal(INVAdjustStockFields.BatchID))) { obj.BatchID = rdr.GetInt32(rdr.GetOrdinal(INVAdjustStockFields.BatchID)); } obj.Qty = rdr.GetDecimal(rdr.GetOrdinal(INVAdjustStockFields.Qty)); if (!rdr.IsDBNull(rdr.GetOrdinal(INVAdjustStockFields.AdjustReasonID))) { obj.AdjustReasonID = rdr.GetInt32(rdr.GetOrdinal(INVAdjustStockFields.AdjustReasonID)); } if (!rdr.IsDBNull(rdr.GetOrdinal(INVAdjustStockFields.CreatedBy))) { obj.CreatedBy = rdr.GetInt32(rdr.GetOrdinal(INVAdjustStockFields.CreatedBy)); } if (!rdr.IsDBNull(rdr.GetOrdinal(INVAdjustStockFields.CredateDate))) { obj.CredateDate = rdr.GetDateTime(rdr.GetOrdinal(INVAdjustStockFields.CredateDate)); } if (!rdr.IsDBNull(rdr.GetOrdinal(INVAdjustStockFields.UpdatedBy))) { obj.UpdatedBy = rdr.GetInt32(rdr.GetOrdinal(INVAdjustStockFields.UpdatedBy)); } if (!rdr.IsDBNull(rdr.GetOrdinal(INVAdjustStockFields.UpdateDate))) { obj.UpdateDate = rdr.GetDateTime(rdr.GetOrdinal(INVAdjustStockFields.UpdateDate)); } obj.StockTypeID = rdr.GetInt32(rdr.GetOrdinal(INVAdjustStockFields.StockTypeID)); obj.OldStockTypeID = rdr.GetInt32(rdr.GetOrdinal(INVAdjustStockFields.OldStockTypeID)); obj.InventoryID = rdr.GetInt32(rdr.GetOrdinal(INVAdjustStockFields.InventoryID)); if (!rdr.IsDBNull(rdr.GetOrdinal(INVAdjustStockFields.ExpiryDate))) { obj.ExpiryDate = rdr.GetDateTime(rdr.GetOrdinal(INVAdjustStockFields.ExpiryDate)); } if (!rdr.IsDBNull(rdr.GetOrdinal(INVAdjustStockFields.BatchNumber))) { obj.BatchNumber = rdr.GetString(rdr.GetOrdinal(INVAdjustStockFields.BatchNumber)); } }
/// <summary> /// Populates the fields of a single objects from the columns found in an open reader. /// </summary> /// <param name="obj" type="INVAdjustStock">Object of INVAdjustStock to populate</param> /// <param name="rdr" type="IDataReader">An object that implements the IDataReader interface</param> /// /// <remarks> /// /// <RevisionHistory> /// Author Date Description /// DLGenerator 4/4/2015 1:32:30 PM Created function /// /// </RevisionHistory> /// /// </remarks> /// internal static void PopulateObjectFromReader(INVAdjustStockBase obj,IDataReader rdr) { obj.AdjustStockID = rdr.GetInt32(rdr.GetOrdinal(INVAdjustStockFields.AdjustStockID)); obj.ProductID = rdr.GetInt32(rdr.GetOrdinal(INVAdjustStockFields.ProductID)); if (!rdr.IsDBNull(rdr.GetOrdinal(INVAdjustStockFields.BatchID))) { obj.BatchID = rdr.GetInt32(rdr.GetOrdinal(INVAdjustStockFields.BatchID)); } obj.Qty = rdr.GetDecimal(rdr.GetOrdinal(INVAdjustStockFields.Qty)); if (!rdr.IsDBNull(rdr.GetOrdinal(INVAdjustStockFields.AdjustReasonID))) { obj.AdjustReasonID = rdr.GetInt32(rdr.GetOrdinal(INVAdjustStockFields.AdjustReasonID)); } if (!rdr.IsDBNull(rdr.GetOrdinal(INVAdjustStockFields.CreatedBy))) { obj.CreatedBy = rdr.GetInt32(rdr.GetOrdinal(INVAdjustStockFields.CreatedBy)); } if (!rdr.IsDBNull(rdr.GetOrdinal(INVAdjustStockFields.CredateDate))) { obj.CredateDate = rdr.GetDateTime(rdr.GetOrdinal(INVAdjustStockFields.CredateDate)); } if (!rdr.IsDBNull(rdr.GetOrdinal(INVAdjustStockFields.UpdatedBy))) { obj.UpdatedBy = rdr.GetInt32(rdr.GetOrdinal(INVAdjustStockFields.UpdatedBy)); } if (!rdr.IsDBNull(rdr.GetOrdinal(INVAdjustStockFields.UpdateDate))) { obj.UpdateDate = rdr.GetDateTime(rdr.GetOrdinal(INVAdjustStockFields.UpdateDate)); } obj.StockTypeID = rdr.GetInt32(rdr.GetOrdinal(INVAdjustStockFields.StockTypeID)); obj.OldStockTypeID = rdr.GetInt32(rdr.GetOrdinal(INVAdjustStockFields.OldStockTypeID)); obj.InventoryID = rdr.GetInt32(rdr.GetOrdinal(INVAdjustStockFields.InventoryID)); if (!rdr.IsDBNull(rdr.GetOrdinal(INVAdjustStockFields.ExpiryDate))) { obj.ExpiryDate = rdr.GetDateTime(rdr.GetOrdinal(INVAdjustStockFields.ExpiryDate)); } if (!rdr.IsDBNull(rdr.GetOrdinal(INVAdjustStockFields.BatchNumber))) { obj.BatchNumber = rdr.GetString(rdr.GetOrdinal(INVAdjustStockFields.BatchNumber)); } }