private List <itemsinorder> CreateIIOs(int iOrderId)
        {
            List <itemsinorder> myIIOs = new List <itemsinorder>();

            foreach (product curProduct in bestelling)
            {
                itemsinorder exIIO = myIIOs.FirstOrDefault(iio => iio.productId.Equals(curProduct.id));

                if (exIIO != null)
                {
                    exIIO.amount++;
                }
                else
                {
                    itemsinorder myIIO = new itemsinorder();
                    myIIO.productId = curProduct.id;
                    myIIO.amount    = 1;
                    myIIO.orderId   = iOrderId;
                    myIIOs.Add(myIIO);
                }
            }
            return(myIIOs);
        }
예제 #2
0
 private void detach_itemsinorders(itemsinorder entity)
 {
     this.SendPropertyChanging();
     entity.order = null;
 }
예제 #3
0
 private void attach_itemsinorders(itemsinorder entity)
 {
     this.SendPropertyChanging();
     entity.order = this;
 }
예제 #4
0
 partial void Deleteitemsinorder(itemsinorder instance);
예제 #5
0
 partial void Updateitemsinorder(itemsinorder instance);
예제 #6
0
 partial void Insertitemsinorder(itemsinorder instance);