public override int Add( ) { if (string.IsNullOrEmpty(codenum)) { MessageBox.Show("请选择鱼粉ID"); return(0); } //if ( Check ( ) == false ) //{ // MessageBox . Show ( "不存在此鱼粉ID,请核实" ); // return 1; //} FromInquirySet inven = new FromInquirySet("新增数据", null, codenum); inven.RefreshEvent += form_RefreshEvent; inven.ShowDialog( ); return(0); }
public override int Modify( ) { if (dataGridView1.CurrentCell == null) { MessageBox.Show("请选择要编辑的行"); return(0); } FishEntity.InquiryEntity entity = dataGridView1.CurrentRow.DataBoundItem as FishEntity.InquiryEntity; if (entity == null) { MessageBox.Show("请选择需要编辑的行"); return(0); } FromInquirySet inven = new FromInquirySet("编辑数据", entity, codenum); inven.RefreshEvent += form_RefreshEvent; inven.ShowDialog( ); return(0); }