public override int Add() { FormUser form = new FormUser("新增数据", null); form.StartPosition = FormStartPosition.CenterParent; form.ShowInTaskbar = false; form.RefreshEvent += form_RefreshEvent; form.ShowDialog(); return(1); }
public override int Modify() { //return base.Modify(); if (dataGridView1.CurrentRow == null) { MessageBox.Show("请选择要编辑的行"); return(0); } FishEntity.PersonEntity entity = dataGridView1.CurrentRow.DataBoundItem as FishEntity.PersonEntity; if (entity == null) { MessageBox.Show("请选择要编辑的行"); return(0); } FormUser form = new FormUser("编辑数据", entity); form.StartPosition = FormStartPosition.CenterParent; form.ShowInTaskbar = false; form.RefreshEvent += form_RefreshEvent; form.ShowDialog(); return(0); }