Example #1
0
 public void SetNumPro(int index, int num)
 {
     currentpro = (ProInCart)ListPro[index];
     if (num <= 0)
     {
         num = 1;
     }
     currentpro.number = num;
     currentpro.setTotal();
     ListPro[index] = currentpro;
 }
Example #2
0
 public void AddNewPro(ProInCart pro)
 {
     int numPro = ListPro.Count;
     for (int i = 0; i < numPro; i++)
     {
         currentpro = (ProInCart)ListPro[i];
         if ((currentpro.type==pro.type)&&(currentpro.id == pro.id))
         {
             currentpro.number = currentpro.number + 1;
             currentpro.rate = pro.rate;
             currentpro.setTotal();
             ListPro[i] = currentpro;
             return;
         }
     }
     this.ListPro.Add(pro);
 }
Example #3
0
        public void AddNewPro(ProInCart pro)
        {
            int numPro = ListPro.Count;

            for (int i = 0; i < numPro; i++)
            {
                currentpro = (ProInCart)ListPro[i];
                if ((currentpro.type == pro.type) && (currentpro.id == pro.id))
                {
                    currentpro.number = currentpro.number + 1;
                    currentpro.rate   = pro.rate;
                    currentpro.setTotal();
                    ListPro[i] = currentpro;
                    return;
                }
            }
            this.ListPro.Add(pro);
        }
Example #4
0
 public void SetNumPro(int index, int num)
 {
     currentpro = (ProInCart)ListPro[index];
     if (num <= 0)
     {
         num = 1;
     }
     currentpro.number = num;
     currentpro.setTotal();
     ListPro[index] = currentpro;
 }