コード例 #1
0
        ////***EAC "isFree" will be replaced by "isFree2Order" below to support XPO (HITT 12054)
        //public bool isFree
        //{
        //    get
        //    {
        //        int t = 0;
        //        foreach (Product p in this)
        //        {
        //            if (p.BookStatus != "X") t += p.NumQtyOrdered;
        //        }
        //        if (t > 20)
        //            return (false);
        //        else
        //            return (true);
        //    }
        //}
        //***EAC Overrides "isFree" to support XPO (HITT 12054)
        public bool isFree2Order(string state)
        {
            int t   = 0;
            int max = 20;

            if (Zipcode.isXPO(state))
            {
                return(true);
            }

            foreach (Product p in this)
            {
                if (p.BookStatus != "X")
                {
                    t += p.NumQtyOrdered;
                }
            }
            if (t > max)
            {
                return(false);
            }
            else
            {
                return(true);
            }
        }
コード例 #2
0
 //***EAC Cart+Shipto objects good to go?
 public bool isOrderAllowed(string state)
 {
     if (Zipcode.isXPO(state))
     {
         if (this.TotalQty > GlobalUtils.Const.XPOMaxQuantity)
         {
             return(false);
         }
         else
         {
             return(true);
         }
     }
     else
     {
         return(true);
     }
 }
コード例 #3
0
        ////***EAC "isFree" will be replaced by "isFree2Order" below to support XPO (HITT 12054)
        //public bool isFree
        //{
        //    get
        //    {
        //        int t = 0;
        //        foreach (Product p in this)
        //        {
        //            if (p.BookStatus != "X") t += p.NumQtyOrdered;
        //        }
        //        if (t > 20)
        //            return (false);
        //        else
        //            return (true);
        //    }
        //}
        //***EAC Overrides "isFree" to support XPO (HITT 12054)
        public bool isFree2Order(string state)
        {
            int  t    = 0;
            int  max  = 20;
            bool temp = false;

            if (Zipcode.isXPO(state))
            {
                temp = true;
            }

            foreach (Product p in this)
            {
                if (p.BookStatus != "X")
                {
                    t += p.NumQtyOrdered;
                }
            }
            if (t > max)
            {
                temp = false;
            }
            else
            {
                temp = true;
            }

            #region Overrrides because NCIPLLM staff can change shipmethod for any order
            string s = this.ShipMethod.ToUpper();
            if (s.Length > 0)
            {
                if (s[0] == 'F' || s[0] == 'U')
                {
                    temp = false;
                }
            }
            #endregion


            return(temp);
        }