private void grid_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (grid.CurrentRow != null) { itemForm = new FormAddItem(this, itemType); getValues(); itemForm.medicine.Enabled = false; itemForm.equipment.Enabled = false; itemForm.ShowDialog(); } }
private void mbView_Click(object sender, EventArgs e) { if (grid.CurrentRow != null) { itemForm = new FormAddItem(this, itemType); getValues(); itemForm.ShowDialog(); } else { MetroMessageBox.Show(this.Parent.Parent, "No results found.", "EMPTY GRID", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void gridItemLibrary_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e) { int intType = 1; if (grid.CurrentRow.Cells[0].Value.ToString().Equals("Medicine")) { intType = 1; } else if (grid.CurrentRow.Cells[0].Value.ToString().Equals("Supply")) { intType = 2; } else if (grid.CurrentRow.Cells[0].Value.ToString().Equals("Equipment")) { intType = 3; } FormAddItem itemForm = new FormAddItem(this, intType); getValues(itemForm, intType); itemForm.ShowDialog(); }
private void mbAdd_Click(object sender, EventArgs e) { itemForm = new FormAddItem(this, itemType); itemForm.choice = 0; itemForm.ShowDialog(); }