public bool DeleteMember(Member member)
 {
     if (MemberDAOMySql.Instance().deleteMember(member))
     {
         members.RemoveAt(members.IndexOf(this.GetMember(member.ssn)));
         return true;
     }
     return false;
 }
 public bool AddMember(Member member)
 {
     if (MemberDAOMySql.Instance().addMember(member))
     {
         this.members.Add(member);
         return true;
     }
     return false;
 }
 public bool UpdateMember(Member member)
 {
     if (MemberDAOMySql.Instance().updateMember(member))
     {
         members[members.IndexOf(this.GetMember(member.ssn))] = member;
         return true;
     }
     return false;
 }
Esempio n. 4
0
 //FILL TEXTS ----------------------
 private void fillTexts(Member member)
 {
     if(member != null)
     {
         this.ssnTB.Text = member.ssn;
         this.nameTB.Text = member.name;
         this.emailTB.Text = member.email;
         this.phoneTB.Text = member.phone;
         this.registeredDTP.Text = member.registered;
         this.addressTB.Text = member.address;
         registeredDTP.Enabled = false;
     }
 }