private void btnAdd_Click(object sender, EventArgs e) { frmLocationAdd myfrmLocationAdd = new frmLocationAdd(); if (myfrmLocationAdd.ShowDialog() == DialogResult.Yes) { btnSearch_Click(sender, e); } }
private void btnUserMod_Click(object sender, EventArgs e) { int count = this.gdvInfo.SelectedRowsCount; if (count == 0) { MessageBox.Show("请先搜索/刷新并选择需要修改的行", "错误!", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } string StoreHouse_ID = this.gdvInfo.GetFocusedRowCellValue("store_house_id").ToString(); string Remark = this.gdvInfo.GetFocusedRowCellValue("remark").ToString(); string Address = this.gdvInfo.GetFocusedRowCellValue("address").ToString(); frmLocationAdd myfrmLocationAdd = new frmLocationAdd(StoreHouse_ID, Remark, Address); if (myfrmLocationAdd.ShowDialog() == DialogResult.Yes) { GetAllData(); } }