Ejemplo n.º 1
0
        /// <summary>
        /// Returns a new ManufacturerLinkDetails instance filled with the DataReader's current record data
        /// </summary>
        protected virtual ManufacturerLinkDetails GetManufacturerLinkFromReader(DbDataReader reader)
        {
            ManufacturerLinkDetails manufacturerLink = new ManufacturerLinkDetails();

            if (reader.HasRows)
            {
                manufacturerLink.ManufacturerLinkId = GetReaderValue_Int32(reader, "ManufacturerLinkId", 0);            //From: [Table]
                manufacturerLink.ManufacturerNo     = GetReaderValue_Int32(reader, "ManufacturerNo", 0);                //From: [usp_selectAll_Allocation]
                manufacturerLink.SupplierCompanyNo  = GetReaderValue_Int32(reader, "SupplierCompanyNo", 0);             //From: [usp_selectAll_Allocation]
                manufacturerLink.ManufacturerRating = GetReaderValue_NullableInt32(reader, "ManufacturerRating", null); //From: [Table]
                manufacturerLink.SupplierRating     = GetReaderValue_NullableInt32(reader, "SupplierRating", null);     //From: [Table]
                manufacturerLink.UpdatedBy          = GetReaderValue_NullableInt32(reader, "UpdatedBy", null);          //From: [Table]
                manufacturerLink.DLUP             = GetReaderValue_DateTime(reader, "DLUP", DateTime.MinValue);         //From: [Table]
                manufacturerLink.ManufacturerName = GetReaderValue_String(reader, "ManufacturerName", "");              //From: [usp_selectAll_Allocation]
                manufacturerLink.SupplierName     = GetReaderValue_String(reader, "SupplierName", "");                  //From: [usp_source_Excess]
            }
            return(manufacturerLink);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// GetForManufacturerAndSupplier
 /// Calls [usp_select_ManufacturerLink_for_Manufacturer_and_Supplier]
 /// </summary>
 public static ManufacturerLink GetForManufacturerAndSupplier(System.Int32?manufacturerNo, System.Int32?supplierCompanyNo)
 {
     Rebound.GlobalTrader.DAL.ManufacturerLinkDetails objDetails = Rebound.GlobalTrader.DAL.SiteProvider.ManufacturerLink.GetForManufacturerAndSupplier(manufacturerNo, supplierCompanyNo);
     if (objDetails == null)
     {
         return(null);
     }
     else
     {
         ManufacturerLink obj = new ManufacturerLink();
         obj.ManufacturerLinkId = objDetails.ManufacturerLinkId;
         obj.ManufacturerNo     = objDetails.ManufacturerNo;
         obj.ManufacturerName   = objDetails.ManufacturerName;
         obj.SupplierCompanyNo  = objDetails.SupplierCompanyNo;
         obj.SupplierName       = objDetails.SupplierName;
         obj.ManufacturerRating = objDetails.ManufacturerRating;
         obj.SupplierRating     = objDetails.SupplierRating;
         obj.UpdatedBy          = objDetails.UpdatedBy;
         obj.DLUP   = objDetails.DLUP;
         objDetails = null;
         return(obj);
     }
 }