Exemple #1
0
        /// <summary>
        /// DropDownForCompany
        /// Calls [usp_dropdown_Address_for_Company]
        /// </summary>
        public static List <Address> DropDownForCompany(System.Int32?companyId)
        {
            List <AddressDetails> lstDetails = Rebound.GlobalTrader.DAL.SiteProvider.Address.DropDownForCompany(companyId);

            if (lstDetails == null)
            {
                return(new List <Address>());
            }
            else
            {
                List <Address> lst = new List <Address>();
                foreach (AddressDetails objDetails in lstDetails)
                {
                    Rebound.GlobalTrader.BLL.Address obj = new Rebound.GlobalTrader.BLL.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.CountryName = objDetails.CountryName;
                    lst.Add(obj);
                    obj = null;
                }
                lstDetails = null;
                return(lst);
            }
        }
Exemple #2
0
        /// <summary>
        /// GetListForCompany
        /// Calls [usp_selectAll_Address_for_Company]
        /// </summary>
        public static List <Address> GetListForCompany(System.Int32?companyId)
        {
            List <AddressDetails> lstDetails = Rebound.GlobalTrader.DAL.SiteProvider.Address.GetListForCompany(companyId);

            if (lstDetails == null)
            {
                return(new List <Address>());
            }
            else
            {
                List <Address> lst = new List <Address>();
                foreach (AddressDetails objDetails in lstDetails)
                {
                    Rebound.GlobalTrader.BLL.Address obj = new Rebound.GlobalTrader.BLL.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
                    lst.Add(obj);
                    obj = null;
                }
                lstDetails = null;
                return(lst);
            }
        }