Пример #1
0
        private void team_Member_Details_Click(object sender, EventArgs e)
        {
            PictureBox clickedPictureBox = sender as PictureBox;
            int        memberid          = Convert.ToInt32(clickedPictureBox.Name.Replace("pic_", ""));
            MemberForm memberform        = new MemberForm();

            memberform.sprintBoard = sprintBoard;
            foreach (TeamMember t in sprintBoard.TeamMembers)
            {
                if (t.MemberID == memberid)
                {
                    memberform.teammember = t;
                }
            }
            memberform.ShowDialog();
            if (memberform.teammember != null)
            {
                if (memberform.teammember.Aktif)
                {
                    MessageBox.Show("Member updated succesfully");
                }
                else
                {
                    MessageBox.Show("Member deleted succesfully");
                }
                dbsql.UpdateMember(memberform.teammember);
                currentPage = 1;
                LoadMembers();
                RefreshBoard();
            }
        }
Пример #2
0
        private void btnNewMember_Click(object sender, EventArgs e)
        {
            MemberForm newmemberform = new MemberForm();

            newmemberform.sprintBoard = sprintBoard;
            newmemberform.ShowDialog();
            TeamMember tm = newmemberform.teammember;

            if (tm != null)
            {
                dbsql.InsertNewTeamMember(tm);
                MessageBox.Show("Member added succesfully");

                LoadMembers();
                RefreshBoard();
            }
        }