/// <summary>
        /// Returns a new IndustryTypeDetails instance filled with the DataReader's current record data
        /// </summary>
        protected virtual IndustryTypeDetails GetIndustryTypeFromReader(DbDataReader reader)
        {
            IndustryTypeDetails industryType = new IndustryTypeDetails();

            if (reader.HasRows)
            {
                industryType.IndustryTypeId = GetReaderValue_Int32(reader, "IndustryTypeId", 0);       //From: [Table]
                industryType.Name           = GetReaderValue_String(reader, "Name", "");               //From: [Table]
                industryType.Inactive       = GetReaderValue_Boolean(reader, "Inactive", false);       //From: [Table]
                industryType.UpdatedBy      = GetReaderValue_NullableInt32(reader, "UpdatedBy", null); //From: [Table]
                industryType.DLUP           = GetReaderValue_NullableDateTime(reader, "DLUP", null);   //From: [Table]
            }
            return(industryType);
        }
Example #2
0
 /// <summary>
 /// Get
 /// Calls [usp_select_IndustryType]
 /// </summary>
 public static IndustryType Get(System.Int32?industryTypeId)
 {
     Rebound.GlobalTrader.DAL.IndustryTypeDetails objDetails = Rebound.GlobalTrader.DAL.SiteProvider.IndustryType.Get(industryTypeId);
     if (objDetails == null)
     {
         return(null);
     }
     else
     {
         IndustryType obj = new IndustryType();
         obj.IndustryTypeId = objDetails.IndustryTypeId;
         obj.Name           = objDetails.Name;
         obj.Inactive       = objDetails.Inactive;
         obj.UpdatedBy      = objDetails.UpdatedBy;
         obj.DLUP           = objDetails.DLUP;
         objDetails         = null;
         return(obj);
     }
 }