Esempio n. 1
0
 protected ModelItem CreatrModelItem(PropertyInfo propertyInfo, ModelItemType modelItemType)
 {
     return(new ModelItem()
     {
         PropertyName = propertyInfo.Name,
         DataValueType = propertyInfo.PropertyType,
         PropertyType = modelItemType,
         IsLazy = propertyInfo.GetGetMethod().IsVirtual,
         PropertyInfo = propertyInfo
     });
 }
Esempio n. 2
0
        private void cmbValidationType_SelectedIndexChanged(object sender, EventArgs e)
        {
            ModelItemType type = (ModelItemType)cmbValidationType.SelectedItem;

            UserControl validationContent = (UserControl)type.ConfigContent;

            if (this.ConfigContent != null && this.ConfigContent.GetControlType().Equals(type.ConfigContent.GetControlType()))
            {
                type.ConfigContent.DisplayConfiguration(this.ConfigContent.Configure());
            }
            else
            if (this.DataColumn != null)
            {
                type.ConfigContent.InitConfiguration(this.DataColumn);
            }

            panelControl.Controls.Clear();
            panelControl.Controls.Add(validationContent);
        }