Exemple #1
0
 /// <summary>
 /// GetForWarehouse
 /// Calls [usp_select_Address_for_Warehouse]
 /// </summary>
 public static Address GetForWarehouse(System.Int32?warehouseId)
 {
     Rebound.GlobalTrader.DAL.AddressDetails objDetails = Rebound.GlobalTrader.DAL.SiteProvider.Address.GetForWarehouse(warehouseId);
     if (objDetails == null)
     {
         return(null);
     }
     else
     {
         Address obj = new Address();
         obj.AddressId   = objDetails.AddressId;
         obj.AddressName = objDetails.AddressName;
         obj.Line1       = objDetails.Line1;
         obj.Line2       = objDetails.Line2;
         obj.Line3       = objDetails.Line3;
         obj.County      = objDetails.County;
         obj.City        = objDetails.City;
         obj.State       = objDetails.State;
         obj.CountryNo   = objDetails.CountryNo;
         obj.ZIP         = objDetails.ZIP;
         obj.Inactive    = objDetails.Inactive;
         obj.UpdatedBy   = objDetails.UpdatedBy;
         obj.DLUP        = objDetails.DLUP;
         obj.CountryName = objDetails.CountryName;
         objDetails      = null;
         return(obj);
     }
 }
Exemple #2
0
 /// <summary>
 /// GetForCompany
 /// Calls [usp_select_Address_for_Company]
 /// </summary>
 public static Address GetForCompany(System.Int32?companyAddressId)
 {
     Rebound.GlobalTrader.DAL.AddressDetails objDetails = Rebound.GlobalTrader.DAL.SiteProvider.Address.GetForCompany(companyAddressId);
     if (objDetails == null)
     {
         return(null);
     }
     else
     {
         Address obj = new Address();
         obj.AddressId        = objDetails.AddressId;
         obj.AddressName      = objDetails.AddressName;
         obj.Line1            = objDetails.Line1;
         obj.Line2            = objDetails.Line2;
         obj.Line3            = objDetails.Line3;
         obj.County           = objDetails.County;
         obj.City             = objDetails.City;
         obj.State            = objDetails.State;
         obj.ZIP              = objDetails.ZIP;
         obj.Inactive         = objDetails.Inactive;
         obj.DLUP             = objDetails.DLUP;
         obj.UpdatedBy        = objDetails.UpdatedBy;
         obj.CompanyAddressId = objDetails.CompanyAddressId;
         obj.DefaultBilling   = objDetails.DefaultBilling;
         obj.DefaultShipping  = objDetails.DefaultShipping;
         obj.CeaseDate        = objDetails.CeaseDate;
         obj.ShipViaNo        = objDetails.ShipViaNo;
         obj.ShipViaAccount   = objDetails.ShipViaAccount;
         obj.Notes            = objDetails.Notes;
         obj.ShippingNotes    = objDetails.ShippingNotes;
         obj.CompanyNo        = objDetails.CompanyNo;
         obj.CountryNo        = objDetails.CountryNo;
         obj.CountryName      = objDetails.CountryName;
         obj.ShipViaName      = objDetails.ShipViaName;
         // [001] code start
         obj.TaxbyAddress = objDetails.TaxbyAddress;
         obj.TaxValue     = objDetails.TaxValue;
         // End
         //[002] code start
         obj.IncotermNo   = objDetails.IncotermNo;
         obj.IncotermName = objDetails.IncotermName;
         //[002] code end
         obj.VatNo          = objDetails.VatNo;
         obj.RecievingNotes = objDetails.RecievingNotes;
         objDetails         = null;
         return(obj);
     }
 }
Exemple #3
0
        /// <summary>
        /// Returns a new AddressDetails instance filled with the DataReader's current record data
        /// </summary>
        protected virtual AddressDetails GetAddressFromReader(DbDataReader reader)
        {
            AddressDetails address = new AddressDetails();

            if (reader.HasRows)
            {
                address.AddressId        = GetReaderValue_Int32(reader, "AddressId", 0);               //From: [Table]
                address.AddressName      = GetReaderValue_String(reader, "AddressName", "");           //From: [Table]
                address.Line1            = GetReaderValue_String(reader, "Line1", "");                 //From: [Table]
                address.Line2            = GetReaderValue_String(reader, "Line2", "");                 //From: [Table]
                address.Line3            = GetReaderValue_String(reader, "Line3", "");                 //From: [Table]
                address.County           = GetReaderValue_String(reader, "County", "");                //From: [Table]
                address.City             = GetReaderValue_String(reader, "City", "");                  //From: [Table]
                address.State            = GetReaderValue_String(reader, "State", "");                 //From: [Table]
                address.CountryNo        = GetReaderValue_NullableInt32(reader, "CountryNo", null);    //From: [Table]
                address.ZIP              = GetReaderValue_String(reader, "ZIP", "");                   //From: [Table]
                address.Inactive         = GetReaderValue_Boolean(reader, "Inactive", false);          //From: [Table]
                address.UpdatedBy        = GetReaderValue_NullableInt32(reader, "UpdatedBy", null);    //From: [Table]
                address.DLUP             = GetReaderValue_DateTime(reader, "DLUP", DateTime.MinValue); //From: [Table]
                address.CountryName      = GetReaderValue_String(reader, "CountryName", "");           //From: [usp_dropdown_Address_for_Company]
                address.CompanyAddressId = GetReaderValue_Int32(reader, "CompanyAddressId", 0);        //From: [usp_select_Address_DefaultBilling_for_Company]
                address.DefaultBilling   = GetReaderValue_Boolean(reader, "DefaultBilling", false);    //From: [usp_select_Address_DefaultBilling_for_Company]
                address.DefaultShipping  = GetReaderValue_Boolean(reader, "DefaultShipping", false);   //From: [usp_select_Address_DefaultBilling_for_Company]
                address.CeaseDate        = GetReaderValue_NullableDateTime(reader, "CeaseDate", null); //From: [usp_select_Address_DefaultBilling_for_Company]
                address.ShipViaNo        = GetReaderValue_NullableInt32(reader, "ShipViaNo", null);    //From: [usp_select_Address_DefaultBilling_for_Company]
                address.ShipViaAccount   = GetReaderValue_String(reader, "ShipViaAccount", "");        //From: [usp_select_Address_DefaultBilling_for_Company]
                address.Notes            = GetReaderValue_String(reader, "Notes", "");                 //From: [usp_select_Address_DefaultBilling_for_Company]
                address.ShippingNotes    = GetReaderValue_String(reader, "ShippingNotes", "");         //From: [usp_select_Address_DefaultBilling_for_Company]
                address.CompanyNo        = GetReaderValue_Int32(reader, "CompanyNo", 0);               //From: [usp_list_Activity_by_Client_with_filter]
                address.ShipViaName      = GetReaderValue_String(reader, "ShipViaName", "");           //From: [usp_select_Address_DefaultBilling_for_Company]
                /// /// ESMS #14
                address.TaxbyAddress = GetReaderValue_NullableInt32(reader, "TaxbyAddress", null);     //From: [usp_select_Address_DefaultBilling_for_Company]
                address.TaxValue     = GetReaderValue_String(reader, "TaxValue", "");
                // End
            }
            return(address);
        }
Exemple #4
0
 /// <summary>
 /// Get
 /// Calls [usp_select_Address]
 /// </summary>
 public static Address Get(System.Int32?addressId)
 {
     Rebound.GlobalTrader.DAL.AddressDetails objDetails = Rebound.GlobalTrader.DAL.SiteProvider.Address.Get(addressId);
     if (objDetails == null)
     {
         return(null);
     }
     else
     {
         Address obj = new Address();
         obj.AddressId   = objDetails.AddressId;
         obj.AddressName = objDetails.AddressName;
         obj.Line1       = objDetails.Line1;
         obj.Line2       = objDetails.Line2;
         obj.Line3       = objDetails.Line3;
         obj.County      = objDetails.County;
         obj.City        = objDetails.City;
         obj.State       = objDetails.State;
         obj.CountryNo   = objDetails.CountryNo;
         obj.ZIP         = objDetails.ZIP;
         obj.Inactive    = objDetails.Inactive;
         obj.UpdatedBy   = objDetails.UpdatedBy;
         obj.DLUP        = objDetails.DLUP;
         obj.CountryName = objDetails.CountryName;
         // [001] code start
         obj.TaxbyAddress = objDetails.TaxbyAddress;
         obj.TaxValue     = objDetails.TaxValue;
         // End
         //[002] code start
         obj.IncotermNo   = objDetails.IncotermNo;
         obj.IncotermName = objDetails.IncotermName;
         //[002] code end
         objDetails = null;
         return(obj);
     }
 }