private void dgItemSelectionRecord_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e) { try { this.Hide(); DataGridViewRow dr = dgItemSelectionRecord.SelectedRows[0]; ItemSelectionUI aSelectionUi = new ItemSelectionUI(); aSelectionUi.Show(); aSelectionUi.txtId.Text = dr.Cells[0].Value.ToString(); aSelectionUi.txtItemNo.Text = dr.Cells[1].Value.ToString(); aSelectionUi.comboCategory.Text = dr.Cells[2].Value.ToString(); aSelectionUi.txtName.Text = dr.Cells[3].Value.ToString(); aSelectionUi.txtItems.Text = dr.Cells[4].Value.ToString(); aSelectionUi.txtPrice.Text = dr.Cells[5].Value.ToString(); aSelectionUi.btnDelete.Enabled = true; aSelectionUi.btnUpdate.Enabled = true; aSelectionUi.btnSave.Enabled = false; } catch (Exception ex) { MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void ItemSelectionRecordUI_FormClosing(object sender, FormClosingEventArgs e) { ItemSelectionUI aUi = new ItemSelectionUI(); aUi.Show(); }
private void itemSelectionToolStripMenuItem_Click(object sender, EventArgs e) { ItemSelectionUI aUi = new ItemSelectionUI(); aUi.Show(); }