/// <summary> /// Returns a new CompanyTypeDetails instance filled with the DataReader's current record data /// </summary> protected virtual CompanyTypeDetails GetCompanyTypeFromReader(DbDataReader reader) { CompanyTypeDetails companyType = new CompanyTypeDetails(); if (reader.HasRows) { companyType.CompanyTypeId = GetReaderValue_Int32(reader, "CompanyTypeId", 0); //From: [Table] companyType.Name = GetReaderValue_String(reader, "Name", ""); //From: [Table] companyType.Inactive = GetReaderValue_Boolean(reader, "Inactive", false); //From: [Table] companyType.UpdatedBy = GetReaderValue_NullableInt32(reader, "UpdatedBy", null); //From: [Table] companyType.DLUP = GetReaderValue_NullableDateTime(reader, "DLUP", null); //From: [Table] } return(companyType); }
/// <summary> /// Get /// Calls [usp_select_CompanyType] /// </summary> public static CompanyType Get(System.Int32?companyTypeId) { Rebound.GlobalTrader.DAL.CompanyTypeDetails objDetails = Rebound.GlobalTrader.DAL.SiteProvider.CompanyType.Get(companyTypeId); if (objDetails == null) { return(null); } else { CompanyType obj = new CompanyType(); obj.CompanyTypeId = objDetails.CompanyTypeId; obj.Name = objDetails.Name; obj.Inactive = objDetails.Inactive; obj.UpdatedBy = objDetails.UpdatedBy; obj.DLUP = objDetails.DLUP; objDetails = null; return(obj); } }