Beispiel #1
0
        /// <summary>
        /// Function to return shopping cart variables table data
        /// </summary>
        /// <returns>Shoppingcartvaraibles</returns>
        public ShoppingCartVariables GetShoppingCartVariables()
        {
            DataTable             dt = objDAL.GetShoppingCartVariables();
            ShoppingCartVariables shoppingCartVariables = new ShoppingCartVariables();

            if (dt.Rows.Count > 0)
            {
                foreach (DataRow row in dt.Rows)
                {
                    shoppingCartVariables = new ShoppingCartVariables
                    {
                        ID                   = Convert.ToInt32(row["ID"]),
                        DeliveryFee          = Convert.ToDecimal(row["DeliveryFee"]),
                        FoodTax              = Convert.ToDecimal(row["FoodTax"]),
                        NonFoodTax           = Convert.ToDecimal(row["NonFoodTax"]),
                        MinOrderSize         = Convert.ToDecimal(row["MinOrderSize"]),
                        NoOfTimeSlot         = Convert.ToInt32(row["NoOfTimeSlot"]),
                        DeliveryFeeCutOff    = Convert.ToDecimal(row["DeliveryFeeCutOff"]),
                        CustomerServiceEmail = Convert.ToString(row["CustomerServiceEmail"]),
                        ContactEmail         = Convert.ToString(row["ContactEmail"]),
                        InfoEmail            = Convert.ToString(row["InfoEmail"]),
                        Location             = Convert.ToString(row["Location"]),
                        StateShortName       = Convert.ToString(row["StateShortName"]),
                        StateLongName        = Convert.ToString(row["StateLongName"]),
                        ShortCompanyName     = Convert.ToString(row["ShortCompanyName"]),
                        LongCompanyName      = Convert.ToString(row["LongCompanyName"]),
                        URL                  = Convert.ToString(row["URL"]),
                        FirstOrderGift       = Convert.ToDecimal(row["FirstOrderGift"]),
                        MemberDeliveryFee    = Convert.ToDecimal(row["MemberDeliveryFee"])
                    };
                }

                return(shoppingCartVariables);
            }

            return(shoppingCartVariables);
        }