Beispiel #1
0
        private void AddMember()
        {
            var member     = new Member();
            var memberForm = new CreateMember(ref member);

            memberForm.ShowDialog();
        }
Beispiel #2
0
        private void BtnEditMember_Click(object sender, EventArgs e)
        {
            var member    = ((MemberWithGroup)TvGroupsMembers.SelectedObject).Member;
            var editGroup = new CreateMember(ref member);

            editGroup.ShowDialog();

            ((MemberWithGroup)TvGroupsMembers.SelectedObject).Member      = member;
            ((MemberWithGroup)TvGroupsMembers.SelectedObject).Birthdate   = member.Birthdate;
            ((MemberWithGroup)TvGroupsMembers.SelectedObject).City        = member.City;
            ((MemberWithGroup)TvGroupsMembers.SelectedObject).Country     = member.Country;
            ((MemberWithGroup)TvGroupsMembers.SelectedObject).CreateDate  = member.CreateDate;
            ((MemberWithGroup)TvGroupsMembers.SelectedObject).Description = member.Description;
            ((MemberWithGroup)TvGroupsMembers.SelectedObject).FirstName   = member.FirstName;
            ((MemberWithGroup)TvGroupsMembers.SelectedObject).Gender      = member.Gender;
            ((MemberWithGroup)TvGroupsMembers.SelectedObject).HouseNumber = member.HouseNumber;
            ((MemberWithGroup)TvGroupsMembers.SelectedObject).LastName    = member.LastName;
            ((MemberWithGroup)TvGroupsMembers.SelectedObject).MemberDate  = member.MemberDate;
            ((MemberWithGroup)TvGroupsMembers.SelectedObject).Picture     = member.Picture;
            ((MemberWithGroup)TvGroupsMembers.SelectedObject).State       = member.State;
            ((MemberWithGroup)TvGroupsMembers.SelectedObject).Street      = member.Street;
            ((MemberWithGroup)TvGroupsMembers.SelectedObject).ZipCode     = member.ZipCode;
            TvGroupsMembers.UpdateObject((MemberWithGroup)TvGroupsMembers.SelectedObject);
        }