private void BtnSave_Click(object sender, RoutedEventArgs e) { LoginEdit win = new LoginEdit(); win.SaveComplete += (model) => { BandGridData(); MessageBox.Show("保存" + model.F_LoginName + "成功!"); }; win.ShowDialog(); }
private void BtnUpdate_Click(object sender, RoutedEventArgs e) { DataRow row = this.GridView.GetFocusedDataRow(); if (row != null) { int id = int.Parse(row["F_ID"].ToString()); LoginEdit win = new LoginEdit(); win.LoadData(id); win.SaveComplete += (model) => { BandGridData(); MessageBox.Show("保存" + model.F_LoginName + "成功!"); }; win.ShowDialog(); } }