Exemplo n.º 1
0
 /// <summary>
 /// Get
 /// Calls [usp_select_ShipVia]
 /// </summary>
 public static ShipVia Get(System.Int32?shipViaId)
 {
     Rebound.GlobalTrader.DAL.ShipViaDetails objDetails = Rebound.GlobalTrader.DAL.SiteProvider.ShipVia.Get(shipViaId);
     if (objDetails == null)
     {
         return(null);
     }
     else
     {
         ShipVia obj = new ShipVia();
         obj.ShipViaId        = objDetails.ShipViaId;
         obj.ClientNo         = objDetails.ClientNo;
         obj.ShipViaName      = objDetails.ShipViaName;
         obj.Notes            = objDetails.Notes;
         obj.Service          = objDetails.Service;
         obj.Shipper          = objDetails.Shipper;
         obj.Buy              = objDetails.Buy;
         obj.Sell             = objDetails.Sell;
         obj.Cost             = objDetails.Cost;
         obj.Charge           = objDetails.Charge;
         obj.PickUp           = objDetails.PickUp;
         obj.Inactive         = objDetails.Inactive;
         obj.UpdatedBy        = objDetails.UpdatedBy;
         obj.DLUP             = objDetails.DLUP;
         obj.IsSameAsShipCost = objDetails.IsSameAsShipCost;
         objDetails           = null;
         return(obj);
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// Returns a new ShipViaDetails instance filled with the DataReader's current record data
        /// </summary>
        protected virtual ShipViaDetails GetShipViaFromReader(DbDataReader reader)
        {
            ShipViaDetails shipVia = new ShipViaDetails();

            if (reader.HasRows)
            {
                shipVia.ShipViaId   = GetReaderValue_Int32(reader, "ShipViaId", 0);               //From: [Table]
                shipVia.ClientNo    = GetReaderValue_Int32(reader, "ClientNo", 0);                //From: [Table]
                shipVia.ShipViaName = GetReaderValue_String(reader, "ShipViaName", "");           //From: [usp_select_Address_DefaultBilling_for_Company]
                shipVia.Notes       = GetReaderValue_String(reader, "Notes", "");                 //From: [usp_select_Address_DefaultBilling_for_Company]
                shipVia.Service     = GetReaderValue_String(reader, "Service", "");               //From: [Table]
                shipVia.Shipper     = GetReaderValue_String(reader, "Shipper", "");               //From: [Table]
                shipVia.Buy         = GetReaderValue_Boolean(reader, "Buy", false);               //From: [Table]
                shipVia.Sell        = GetReaderValue_Boolean(reader, "Sell", false);              //From: [Table]
                shipVia.Cost        = GetReaderValue_NullableDouble(reader, "Cost", null);        //From: [usp_selectAll_Login_Top_Salespersons]
                shipVia.Charge      = GetReaderValue_NullableDouble(reader, "Charge", null);      //From: [Table]
                shipVia.PickUp      = GetReaderValue_String(reader, "PickUp", "");                //From: [usp_select_SalesOrder]
                shipVia.Inactive    = GetReaderValue_Boolean(reader, "Inactive", false);          //From: [Table]
                shipVia.UpdatedBy   = GetReaderValue_NullableInt32(reader, "UpdatedBy", null);    //From: [Table]
                shipVia.DLUP        = GetReaderValue_DateTime(reader, "DLUP", DateTime.MinValue); //From: [Table]
            }
            return(shipVia);
        }