private void btnOK_Click(object sender, EventArgs e) { var num1 = DatabaseAPI.Database.Entities.Length - 1; for (var index = 0; index <= num1; ++index) { if (!((DatabaseAPI.Database.Entities[index].UID.ToLower() == myEntity.UID.ToLower()) & (index != myEntity.GetNId()))) { continue; } MessageBox.Show($"{myEntity.UID} is not unique. Please enter a unique name.", "Invalid Name", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } myEntity.UpdateNClassID(DatabaseAPI.NidFromUidClass); DialogResult = DialogResult.OK; Hide(); }
void btnOK_Click(object sender, EventArgs e) { int num1 = DatabaseAPI.Database.Entities.Length - 1; for (int index = 0; index <= num1; ++index) { if (!(DatabaseAPI.Database.Entities[index].UID.ToLower() == myEntity.UID.ToLower() & index != myEntity.GetNId())) { continue; } Interaction.MsgBox(myEntity.UID + " is not unique. Please enter a unique name.", MsgBoxStyle.Information, "Invalid Name"); return; } myEntity.UpdateNClassID(DatabaseAPI.NidFromUidClass); DialogResult = DialogResult.OK; Hide(); }