private void addNewShipperToolStripMenuItem_Click(object sender, EventArgs e) { if (myfrmShippers == null || myfrmShippers.IsDisposed) { myfrmShippers = new frmShippers(this.business); myfrmShippers.MdiParent = this; } myfrmShippers.Show(); }
private void dgShippers_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.ColumnIndex == dgShippers.Columns["ColShipperEdit"].Index && e.RowIndex >= 0) { if (myfrmShippers == null || myfrmShippers.IsDisposed) { int index = e.RowIndex; String EditingItemID = (String)dgShippers.Rows[index].Cells[1].Value; //DataGridViewButtonCell buttonCell = // (DataGridViewButtonCell)dgShippers.Rows[e.RowIndex].Cells["ColShipperEdit"]; myfrmShippers = new frmShippers(EditingItemID, myBusiness); // buttonCell.ReadOnly = false; myfrmShippers.MdiParent = this.MdiParent; } // myfrmShippers.Text = "Add New Shippers"; myfrmShippers.Show(); } }