Maybe cos the button with the ID 2 arent writed down in your code. so for now nothing will happen when you press your "Add" button, Locutos only made the "save" part for you so i cant see how that dialog would work without a fev more lines of code
Same goes for the button "Delete"..