/// <summary> /// 更新按钮功能 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnUpdata_Click(object sender, EventArgs e) { int id = Convert.ToInt32(this.MyDataList.SelectedRows[0].Cells[0].Value); //弹出修改框 StInfoUpdate update = new StInfoUpdate(id);//通过这个类中构造函数传id值 update.Show(); this.Hide(); }