private void sbAdd_Click(object sender, EventArgs e) { frmEditUseInfo myEditUseInfo = new frmEditUseInfo(); myEditUseInfo.DataBind(""); if (myEditUseInfo.ShowDialog() == DialogResult.OK) { DataBind(); } myEditUseInfo.Dispose(); }
private void sbEdit_Click(object sender, EventArgs e) { if (gvMain.FocusedRowHandle < 0) { return; } DataRow dr = gvMain.GetDataRow(gvMain.FocusedRowHandle); frmEditUseInfo myEditUseInfo = new frmEditUseInfo(); myEditUseInfo.DataBind(dr["F_Name"].ToString()); if (myEditUseInfo.ShowDialog() == DialogResult.OK) { DataBind(); } myEditUseInfo.Dispose(); }