private void NewPersonnelButton_Click(object sender, EventArgs e) { NewUserForm form = new NewUserForm(); if (form.ShowDialog() != DialogResult.OK) { return; } Personnel personnel = form.Personnel; ViewModelGlobals.Personnels.Add(personnel); UpdateView(); }
private void btn_AddUser_Click(object sender, EventArgs e) { NewUserForm _form = new NewUserForm(); if (_form.ShowDialog() == DialogResult.OK) { { DataTable _dt = (new DAL.DAL_UserInfo()).selectUserInfoListWithKeyAndGroup(""); if (_dt != null) { this.UserInfoListView.DataSource = _dt; } } } }