Пример #1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            FrmAddMember frm = new FrmAddMember(this);

            frm.TopLevel   = false;
            frm.AutoScroll = true;
            this.Controls.Add(frm);
            frm.FormBorderStyle = FormBorderStyle.None;
            frm.dto             = dto;
            frm.IsUpdate        = false;
            frm.Show();
            this.textBox1.Clear();
        }
Пример #2
0
 private void btnEdit_Click(object sender, EventArgs e)
 {
     if (detail.ID == 0)
     {
         MessageBox.Show("請選擇一名會員");
     }
     else
     {
         FrmAddMember frm = new FrmAddMember(this);
         frm.TopLevel   = false;
         frm.AutoScroll = true;
         this.Controls.Add(frm);
         frm.FormBorderStyle = FormBorderStyle.None;
         frm.detail          = detail;
         frm.dto             = dto;
         frm.IsUpdate        = true;
         frm.Show();
     }
 }