// Command to delete the material
        public void deleteMaterial(int materialId)
        {
            // Delete the material from the database
            MaterialModel.deleteMaterial(materialId);
            // Remove the material from the deleted material list
            MaterialModel deletedMaterial = materialList.Where(mat => mat.materialId == materialId).First();

            // Remove from the active material list
            materialList.Remove(deletedMaterial);
            originalMaterialList.Remove(deletedMaterial);

            // Add to the deleted material list
            deletedMaterialList.Add(deletedMaterial);
        }