// Form for updating an exisiting quote
        public QuoteFormViewModel(BaseViewModel parent, int quoteId, Boolean updating)
        {
            this.parent = parent;
            // will be set to true
            this.updating = updating;
            btnText       = "Update Quote";

            // Get the quote
            this.quote      = QuoteModel.getQuote(quoteId);
            this.customerId = quote.customer.customerId;

            // Get the customer the quote is being issued for
            customer = CustomerModel.getCustomer(customerId);

            // Set visibility of business textblocks
            if (customer.companyName == null || customer.vatNo == null)
            {
                isBusinessCustomer = "Collapsed";
            }
            else
            {
                isBusinessCustomer = "Visible";
            }

            // Get all materials
            materialList = MaterialModel.getMaterialList();
            // Keep a copy of the material list for filtering
            originalMaterialList = new ObservableCollection <MaterialModel>(materialList);

            // Get the quote materials that have been generated for this quote
            quoteMaterialList = QuoteMaterialModel.getQuoteMaterialList(quoteId);

            // Update the total quote cost
            updateTotalQuoteCosts();
        }