private void btnOK_Click(object sender, EventArgs e) { for (int i = 0; i < listTextBox.Count - 1; i++) { for (int j = i + 1; j < listTextBox.Count; j++) { if (listTextBox[i].Text != "" && listTextBox[i].Text == listTextBox[j].Text) { DevExpress.XtraEditors.XtraMessageBox.Show("Discriminator is duplicated"); listTextBox[i].Focus(); return; } } } foreach (AttributeShape att in connector.supertype.attributes) { if (att.sName == cboSubtypeDis.EditValue.ToString()) { attDis = att; break; } } foreach (DevExpress.XtraEditors.TextEdit txtDiscriminator in listTextBox) { Discriminators.Add(txtDiscriminator.Text); } this.DialogResult = DialogResult.OK; }
private void btnOK_Click(object sender, EventArgs e) { for (int i = 0; i < listTextBox.Count -1; i++ ) { for (int j = i + 1; j < listTextBox.Count; j++ ) if (listTextBox[i].Text != "" && listTextBox[i].Text == listTextBox[j].Text) { DevExpress.XtraEditors.XtraMessageBox.Show("Discriminator is duplicated"); listTextBox[i].Focus(); return; } } foreach (AttributeShape att in connector.supertype.attributes) { if (att.sName == cboSubtypeDis.EditValue.ToString()) { attDis = att; break; } } foreach (DevExpress.XtraEditors.TextEdit txtDiscriminator in listTextBox) { Discriminators.Add(txtDiscriminator.Text); } this.DialogResult = DialogResult.OK; }
public INotation createNotation() { AttributeShape attribute = new AttributeShape(); attribute.sName = this.name; attribute.type = this.type; attribute.Location = new Point(this.x, this.y); attribute.Size = new Size(this.w, this.h); attribute.dataType = this.DataType; attribute.dataLength = this.Length; attribute.allowNull = this.AllowNull; attribute.description = this.Description; return (INotation)attribute; }
public INotation createNotation() { AttributeShape attribute = new AttributeShape(); attribute.sName = this.name; attribute.type = this.type; attribute.Location = new Point(this.x, this.y); attribute.Size = new Size(this.w, this.h); attribute.dataType = this.DataType; attribute.dataLength = this.Length; attribute.allowNull = this.AllowNull; attribute.description = this.Description; return((INotation)attribute); }
public void addAttribute(AttributeShape att) { attributes.Add(att); att.Entity = this; att.Disposed += new EventHandler(att_Disposed); }
public void addAttribute(AttributeShape att) { attributes.Add(att); att.Disposed += new EventHandler(att_Disposed); if (attributes.Count >= 1) { if (this.cardinalities.Count > 1) { if (this.cardinalities[0].MaxCardinality == -1 && this.cardinalities[1].MaxCardinality == -1) { this.type = RelationshipType.AssociativeEntity; this.sName = this.sName.ToUpper(); Invalidate(); } } } }