/// <summary> /// Returns a new ManufacturerDetails instance filled with the DataReader's current record data /// </summary> protected virtual ManufacturerDetails GetManufacturerFromReader(DbDataReader reader) { ManufacturerDetails manufacturer = new ManufacturerDetails(); if (reader.HasRows) { manufacturer.ManufacturerId = GetReaderValue_Int32(reader, "ManufacturerId", 0); //From: [Table] manufacturer.ManufacturerName = GetReaderValue_String(reader, "ManufacturerName", ""); //From: [usp_selectAll_Allocation] manufacturer.Notes = GetReaderValue_String(reader, "Notes", ""); //From: [usp_select_Address_DefaultBilling_for_Company] manufacturer.ManufacturerCode = GetReaderValue_String(reader, "ManufacturerCode", ""); //From: [usp_selectAll_Allocation] manufacturer.Inactive = GetReaderValue_Boolean(reader, "Inactive", false); //From: [Table] manufacturer.UpdatedBy = GetReaderValue_NullableInt32(reader, "UpdatedBy", null); //From: [Table] manufacturer.DLUP = GetReaderValue_DateTime(reader, "DLUP", DateTime.MinValue); //From: [Table] manufacturer.URL = GetReaderValue_String(reader, "URL", ""); //From: [Table] manufacturer.FullName = GetReaderValue_String(reader, "FullName", ""); //From: [Table] manufacturer.RowCnt = GetReaderValue_NullableInt32(reader, "RowCnt", null); //From: [usp_list_Activity_by_Client_with_filter] } return(manufacturer); }
/// <summary> /// Get /// Calls [usp_select_Manufacturer] /// </summary> public static Manufacturer Get(System.Int32?manufacturerId) { Rebound.GlobalTrader.DAL.ManufacturerDetails objDetails = Rebound.GlobalTrader.DAL.SiteProvider.Manufacturer.Get(manufacturerId); if (objDetails == null) { return(null); } else { Manufacturer obj = new Manufacturer(); obj.ManufacturerId = objDetails.ManufacturerId; obj.ManufacturerName = objDetails.ManufacturerName; obj.Notes = objDetails.Notes; obj.ManufacturerCode = objDetails.ManufacturerCode; obj.Inactive = objDetails.Inactive; obj.UpdatedBy = objDetails.UpdatedBy; obj.DLUP = objDetails.DLUP; obj.URL = objDetails.URL; obj.IsPDFAvailable = objDetails.IsPDFAvailable; obj.ConflictResource = objDetails.ConflictResource; objDetails = null; return(obj); } }