private void metroButton5_Click(object sender, EventArgs e) { if (metroGrid4.Rows.Count != 0) { AttributeValueModel.id = metroGrid4.Rows[metroGrid4.SelectedRows[0].Index].Cells[0].Value.ToString(); AttributeValueModel.name = metroGrid4.Rows[metroGrid4.SelectedRows[0].Index].Cells[1].Value.ToString(); AttributeValueModel.attribute = attributeValueGrid.Rows[attributeValueGrid.SelectedRows[0].Index].Cells[1].Value.ToString(); add_attributeValue update = new add_attributeValue(true); update.ShowDialog(); } else { MetroMessageBox.Show(this, "You need to add a value first", "Update Failed", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
private void metroButton6_Click(object sender, EventArgs e) { add_attributeValue add = new add_attributeValue(); add.ShowDialog(); }