internal void saveMemeber(string name, string instrument, string joinDate, Form addMember, Form parent, bool isEdit) { //checks if (name.Length == 0) { showMessage(true, "Enter a name"); return; } else if (instrument.Length == 0) { showMessage(true, "Enter an instrument"); return; } else if (joinDate.Length == 0) { showMessage(true, "Enter a join date"); return; } if (isEdit) { memberHighlight.setJoinDate(joinDate); memberHighlight.setName(name); memberHighlight.setInstrument(instrument); close(addMember); close(parent); editBand(); } else { //Make new member Member m = new Member(name, instrument); m.setJoinDate(joinDate); //Add to parent view addMemeberToAddBandView(m, (AddBand)parent); //Close current view close(addMember); } }
private Member memberParser(XmlNodeReader reader) { string name = reader.GetAttribute("name"); string instrument = reader.GetAttribute("instrument"); Member m = new Member(name, instrument); reader.Read(); reader.Read(); m.setJoinDate(reader.Value); return m; }