/// <summary> /// 新增 /// </summary> private void DoCreate() { FrmPDAEdit frmCreate = new FrmPDAEdit(); frmCreate.DataSourceChanged += OnCreateChanage; frmCreate.ShowDialog(); }
/// <summary> /// 编辑 /// </summary> private void ShowEditForm() { PDAEntity editEntity = SelectedRow; if (editEntity == null) { MsgBox.Warn("没有要修改的数据。"); return; } FrmPDAEdit frmEdit = new FrmPDAEdit(editEntity); frmEdit.DataSourceChanged += OnEditChanage; frmEdit.ShowDialog(); }