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