示例#1
0
        private void btnNewMember_Click(object sender, EventArgs e)
        {
            var memberForm = new MemberForm();

            memberForm.m_registryiSdone = FinishCallback;
            memberForm.ShowDialog();
        }
示例#2
0
        private void gvMembers_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.ColumnIndex == gvMembers.Columns["editButton"].Index)
            {
                //Do something with your button.
                Member member = StorageManager.GetSingleton().GetMemeberById((int)gvMembers.CurrentRow.Cells[4].Value);
                var    mForm  = new MemberForm(member);
                mForm.m_registryiSdone = FinishCallback;
                mForm.ShowDialog();
            }
            if (e.ColumnIndex == gvMembers.Columns["courseButton"].Index)
            {
                //Do something with your button.
                //Member member = (Member)gvMembers.CurrentRow.DataBoundItem;
                Member member = StorageManager.GetSingleton().GetMemeberById((int)gvMembers.CurrentRow.Cells[4].Value);

                var mForm = new DialogNeedApplyCourse(member, null);
                mForm.ShowDialog();
            }
            if (e.ColumnIndex == gvMembers.Columns["delButton"].Index)
            {
                Member member = StorageManager.GetSingleton().GetMemeberById((int)gvMembers.CurrentRow.Cells[4].Value);

                var mForm = new DialogForm("ยืนยันการลบสมาชิก?", $"ลบ {member.Name} {member.LastName}");
                if (mForm.ShowDialog() == DialogResult.OK)
                {
                    StorageManager.GetSingleton().RemoveMember(member);
                    InitMember();
                    MessageBox.Show("ลบข้อมูลเรียบร้อยแล้ว");
                }
            }
        }
示例#3
0
        private void lbNumMember_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            Overlay overlay = new Overlay();

            overlay.Location = new Point(Form.Location.X, Form.Location.Y + 32);
            overlay.Show();
            MemberForm mbf = new MemberForm(Conversation.memberList);

            mbf.ShowDialog();
            overlay.Dispose();
        }