/// <summary> /// Binds the data. /// </summary> private void BindData() { if (mc == null) { if (OwnerClassName != String.Empty) { MetaClass ownerClass = MetaDataWrapper.GetMetaClassByName(OwnerClassName); ddlClass.Items.Add(new ListItem(CHelper.GetResFileString(ownerClass.FriendlyName), ownerClass.Name)); ddlClass.Enabled = false; } else { foreach (MetaClass cls in MetaDataWrapper.GetMetaClassesSupportedCards()) { ddlClass.Items.Add(new ListItem(cls.Name, cls.Name)); } } txtClassName.Attributes.Add("onblur", "SetName('" + txtClassName.ClientID + "','" + txtClassFriendlyName.ClientID + "','" + vldClassFriendlyName_Required.ClientID + "')" + "; SetName('" + txtClassName.ClientID + "','" + txtClassPluralName.ClientID + "','" + vldClassPluralName_Required.ClientID + "')"); } else { MetaClass ownerClass = MetaDataWrapper.GetOwnerClass(mc); ddlClass.Items.Add(new ListItem(ownerClass.Name, ownerClass.Name)); ddlClass.Enabled = false; txtClassName.Text = mc.Name; txtClassName.Enabled = false; txtClassFriendlyName.Text = mc.FriendlyName; txtClassPluralName.Text = mc.PluralName; } }