Пример #1
0
        /// <summary>
        /// Called when Button SendToViewModel is clicked
        /// </summary>
        private void OnAdd()
        {

            ProductInfo productInfo = new ProductInfo();
            productInfo.setUnitPrice(Price);
            productInfo.setQuantity(OrderItemQuantity);
            productInfo.setDiscount(OrderItemDiscount);
            productInfo.setPurchaseOrderNo(productInfo.getPurchaseOrderNo());

            List productList = new ArrayList();
            productList.add(productInfo);

            SaleInfo saleInfo = new SaleInfo();
            CustomerInfo customerInfo = new CustomerInfo();
            saleInfo.setProductList(productList);
            saleInfo.setCustomerUserId(customerInfo.getUserInfo().getId());
            saleInfo.setOrderNo(saleInfo.getOrderNo());
            saleInfo.setStatusId(saleInfo.getStatusId());
            saleInfo.setRemarks(saleInfo.getRemarks());

            SaleManager saleManager = new SaleManager();
            saleManager.addSaleOrder(saleInfo);

            MessageBox.Show("Save Successfully");
        }