private void toolStripMenuItem_WPSRowAdd_Click(object sender, EventArgs e) { Form_WPSUpdate myForm = new Form_WPSUpdate(); myForm.myClass_WPS = new Class_WPS(); myForm.bool_Add = true; if (myForm.ShowDialog() == DialogResult.OK) { this.RefreshData(false); Class_DataControlBind.SetDataGridViewSelectedPosition("WPSID", myForm.myClass_WPS.WPSID, this.dataGridView_Data); } }
private void toolStripMenuItem_WPSRowModify_Click(object sender, EventArgs e) { Form_WPSUpdate myForm = new Form_WPSUpdate(); myForm.myClass_WPS = new Class_WPS(this.dataGridView_Data.CurrentRow.Cells["WPSID"].Value.ToString()); myForm.bool_Add = false; myForm.myEventArgs_WPSQuery = this.myEventArgs_WPSQuery; if (myForm.ShowDialog() == DialogResult.OK) { this.RefreshData(true); } }