예제 #1
0
        public void getWishListItem(WishList pWishlistItem)
        {
            WishList temp = new WishList();

            temp.customerNo     = wishlist.customerNo;
            temp.wishListItemNo = wishlistItems.Count + 1;
            temp.pieceNo        = pWishlistItem.pieceNo;
            temp.patternNo      = pWishlistItem.patternNo;
            temp.sizeNo         = pWishlistItem.sizeNo;
            temp.customizations = pWishlistItem.customizations;
            temp.quantity       = pWishlistItem.quantity;
            temp.wishDate       = DateTime.Now;
            wishlistItems.Add(temp);
            DataGridViewRow newRow = new DataGridViewRow();

            newRow.CreateCells(dataGridView1);
            newRow.Cells[0].Value = temp.wishListItemNo.ToString();
            newRow.Cells[1].Value = DatabaseAccess.GetPieceByNo(temp.pieceNo).pieceName;
            newRow.Cells[2].Value = DatabaseAccess.GetPatternByNo(temp.patternNo).patternName;
            newRow.Cells[3].Value = DatabaseAccess.GetPieceSizeByNo(temp.pieceNo, temp.sizeNo).totalPounds.ToString();
            newRow.Cells[4].Value = temp.customizations;
            newRow.Cells[5].Value = temp.quantity.ToString();
            newRow.Cells[6].Value = temp.wishDate.ToString("MM/dd/yyyy");
            dataGridView1.Rows.Add(newRow);
        }
예제 #2
0
 //show line items in datagrid view
 private void displayLineItems()
 {
     dgvLineItems.Rows.Clear();
     foreach (LineItem item in order.lineItems)
     {
         DataGridViewRow newRow = new DataGridViewRow();
         newRow.CreateCells(dgvLineItems);
         newRow.Cells[0].Value = DatabaseAccess.GetPieceByNo(item.pieceNo).pieceName;
         newRow.Cells[1].Value = DatabaseAccess.GetPieceSizeByNo(item.pieceNo, item.sizeNo).totalPounds.ToString();
         newRow.Cells[2].Value = DatabaseAccess.GetPatternByNo(item.patternNo).patternName;
         newRow.Cells[3].Value = item.quantity.ToString();
         newRow.Cells[4].Value = item.price.ToString("f2");
         newRow.Cells[5].Value = item.totalPrice.ToString("f2");
         newRow.Cells[6].Value = item.status.ToString();
         newRow.Cells[7].Value = item.customizations;
         newRow.Cells[8].Value = item.isGift;
         newRow.Cells[9].Value = item.cardMessage;
         dgvLineItems.Rows.Add(newRow);
     }
 }
예제 #3
0
        public void getShowPieceTaken(LineItem pItem)
        {
            showPiece temp = new showPiece();

            temp.showNo      = show.showNo;
            temp.itemNo      = takenPieces;
            temp.sold        = false;
            temp.pieceName   = DatabaseAccess.GetPieceByNo(pItem.pieceNo).pieceName;
            temp.patternName = DatabaseAccess.GetPatternByNo(pItem.patternNo).patternName;
            temp.pieceSize   = DatabaseAccess.GetPieceSizeByNo(pItem.pieceNo, pItem.sizeNo).totalPounds;
            piecesTaken.Add(temp);
            DataGridViewRow newRow = new DataGridViewRow();

            newRow.CreateCells(dgvPiecesTaken);
            newRow.Cells[0].Value = temp.itemNo;
            newRow.Cells[1].Value = temp.pieceName;
            newRow.Cells[2].Value = temp.patternName;
            newRow.Cells[3].Value = temp.pieceSize;
            dgvPiecesTaken.Rows.Add(newRow);
            updateShowPieces();
            takenPieces++;
        }