Example #1
0
 /// <summary>
 /// Get
 /// Calls [usp_select_Country]
 /// </summary>
 public static Country Get(System.Int32?countryId)
 {
     Rebound.GlobalTrader.DAL.CountryDetails objDetails = Rebound.GlobalTrader.DAL.SiteProvider.Country.Get(countryId);
     if (objDetails == null)
     {
         return(null);
     }
     else
     {
         Country obj = new Country();
         obj.CountryId               = objDetails.CountryId;
         obj.CountryName             = objDetails.CountryName;
         obj.Notes                   = objDetails.Notes;
         obj.TelephonePrefix         = objDetails.TelephonePrefix;
         obj.Duty                    = objDetails.Duty;
         obj.TaxNo                   = objDetails.TaxNo;
         obj.ShippingCost            = objDetails.ShippingCost;
         obj.ClientNo                = objDetails.ClientNo;
         obj.GlobalCountryNo         = objDetails.GlobalCountryNo;
         obj.DeliveryLeadTimeAir     = objDetails.DeliveryLeadTimeAir;
         obj.DeliveryLeadTimeSurface = objDetails.DeliveryLeadTimeSurface;
         obj.IsPriorityForLists      = objDetails.IsPriorityForLists;
         obj.Inactive                = objDetails.Inactive;
         obj.UpdatedBy               = objDetails.UpdatedBy;
         obj.DLUP                    = objDetails.DLUP;
         obj.TaxName                 = objDetails.TaxName;
         obj.ShipSurchargePer        = objDetails.ShipSurchargePer;
         objDetails                  = null;
         return(obj);
     }
 }
Example #2
0
        /// <summary>
        /// Returns a new CountryDetails instance filled with the DataReader's current record data
        /// </summary>
        protected virtual CountryDetails GetCountryFromReader(DbDataReader reader)
        {
            CountryDetails country = new CountryDetails();

            if (reader.HasRows)
            {
                country.CountryId               = GetReaderValue_Int32(reader, "CountryId", 0);                          //From: [Table]
                country.CountryName             = GetReaderValue_String(reader, "CountryName", "");                      //From: [usp_dropdown_Address_for_Company]
                country.Notes                   = GetReaderValue_String(reader, "Notes", "");                            //From: [usp_select_Address_DefaultBilling_for_Company]
                country.TelephonePrefix         = GetReaderValue_String(reader, "TelephonePrefix", "");                  //From: [Table]
                country.Duty                    = GetReaderValue_Boolean(reader, "Duty", false);                         //From: [Table]
                country.TaxNo                   = GetReaderValue_NullableInt32(reader, "TaxNo", null);                   //From: [Table]
                country.ShippingCost            = GetReaderValue_NullableDouble(reader, "ShippingCost", null);           //From: [Table]
                country.ClientNo                = GetReaderValue_Int32(reader, "ClientNo", 0);                           //From: [Table]
                country.GlobalCountryNo         = GetReaderValue_NullableInt32(reader, "GlobalCountryNo", null);         //From: [Table]
                country.DeliveryLeadTimeAir     = GetReaderValue_NullableInt32(reader, "DeliveryLeadTimeAir", null);     //From: [Table]
                country.DeliveryLeadTimeSurface = GetReaderValue_NullableInt32(reader, "DeliveryLeadTimeSurface", null); //From: [Table]
                country.IsPriorityForLists      = GetReaderValue_Boolean(reader, "IsPriorityForLists", false);           //From: [Table]
                country.Inactive                = GetReaderValue_Boolean(reader, "Inactive", false);                     //From: [Table]
                country.UpdatedBy               = GetReaderValue_NullableInt32(reader, "UpdatedBy", null);               //From: [Table]
                country.DLUP                    = GetReaderValue_DateTime(reader, "DLUP", DateTime.MinValue);            //From: [Table]
                country.TaxName                 = GetReaderValue_String(reader, "TaxName", "");                          //From: [usp_select_Country]
            }
            return(country);
        }
Example #3
0
 /// <summary>
 /// GetShippingCost
 /// Calls [usp_select_Country_ShippingCost]
 /// </summary>
 public static Country GetShippingCost(System.Int32?countryId)
 {
     Rebound.GlobalTrader.DAL.CountryDetails objDetails = Rebound.GlobalTrader.DAL.SiteProvider.Country.GetShippingCost(countryId);
     if (objDetails == null)
     {
         return(null);
     }
     else
     {
         Country obj = new Country();
         obj.ShippingCost = objDetails.ShippingCost;
         objDetails       = null;
         return(obj);
     }
 }