private void btnAdd_Click(object sender, EventArgs e) { UserFrm frm = new UserFrm(null); frm.UserChanged += Frm_UserChanged; frm.ShowDialog(); }
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); } }
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(); } }
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); } } }