private void addRequestCodeToolStripMenuItem_Click(object sender, EventArgs e) { GlobalData data = GlobalData.getinstance(); data.isEditingNow = false; CodeForm to = new CodeForm(); to.Show(); }
private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e) { if (dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value != null) { dataGridView1.CurrentRow.Selected = true; Request req = Request.getInstance(); req.id = dataGridView1.Rows[e.RowIndex].Cells["ID"].FormattedValue.ToString(); req.number_code = dataGridView1.Rows[e.RowIndex].Cells["Number Code"].FormattedValue.ToString(); req.replace_code = dataGridView1.Rows[e.RowIndex].Cells["Replace Code"].FormattedValue.ToString(); req.amount = dataGridView1.Rows[e.RowIndex].Cells["Amount"].FormattedValue.ToString(); Request.SetInstance(req); GlobalData data = GlobalData.getinstance(); data.isEditingNow = true; CodeForm to = new CodeForm(); to.Show(); } }