コード例 #1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            UserFrm frm = new UserFrm(null);

            frm.UserChanged += Frm_UserChanged;
            frm.ShowDialog();
        }
コード例 #2
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            UserFrm frm = new UserFrm(null);

            if (frm.ShowDialog() == DialogResult.OK)
            {
                OnUserChangeEventArgs el = new OnUserChangeEventArgs();
                el.User = frm.User;
                OnUserChanged(el);
            }
        }
コード例 #3
0
        private void BtnEdit_Click(object sender, EventArgs e)
        {
            PTUser user = ((sender as Control).Tag as PTUser);

            if (user == null)
            {
                throw new Exception("获取用户数据失败。");
            }
            else
            {
                UserFrm frm = new UserFrm(user);
                frm.UserChanged += Frm_UserChanged;
                frm.ShowDialog();
            }
        }
コード例 #4
0
        private void BtnEdit_Click(object sender, EventArgs e)
        {
            PTUser user = ((sender as Control).Tag as PTUser);

            if (user == null)
            {
                throw new Exception("获取用户数据失败。");
            }
            else
            {
                UserFrm frm = new UserFrm(user);
                if (frm.ShowDialog() == DialogResult.OK)
                {
                    OnUserChangeEventArgs el = new OnUserChangeEventArgs();
                    el.User = user;
                    OnUserChanged(el);
                }
            }
        }