Ejemplo n.º 1
0
 // Adds a material to form
 public void addMaterial(int materialId)
 {
     // Set as selected material
     selectedMaterial = MaterialModel.getMaterial(materialId);
     // Create a new blank quote material
     quoteMaterial = new QuoteMaterialModel(quote.quoteId, materialId, selectedMaterial.pricePerUnit, selectedMaterial.isService);
 }
Ejemplo n.º 2
0
        // Form for updating a material
        public MaterialFormViewModel(BaseViewModel parent, int materalId)
        {
            this.parent = parent;

            // Get the material being updating
            material = MaterialModel.getMaterial(materalId);
            btnText  = "Update Material";
        }