Exemplo n.º 1
0
 public static void CustomAssignProperty(object sender, CustomPropertyEventArgs pea)
 {
     if (pea.PropertyInfo.Name == "DataType")
     {
         Type t = Type.GetType(pea.Value.ToString());
         pea.PropertyInfo.SetValue(pea.Source, t, null);
         pea.Handled = true;
     }
     else if (pea.PropertyInfo.Name == "PrimaryKey")
     {
         pea.PropertyInfo.SetValue(pea.Source, new DataColumn[] { (DataColumn)pea.Value }, null);
         pea.Handled = true;
     }
 }
Exemplo n.º 2
0
 public static void CustomAssignProperty(object sender, CustomPropertyEventArgs pea)
 {
     if (pea.PropertyInfo.Name == "DataType")
     {
         Type t = Type.GetType(pea.Value.ToString());
         pea.PropertyInfo.SetValue(pea.Source, t, null);
         pea.Handled = true;
     }
     else if (pea.PropertyInfo.Name == "PrimaryKey")
     {
         pea.PropertyInfo.SetValue(pea.Source, new DataColumn[] { (DataColumn)pea.Value }, null);
         pea.Handled = true;
     }
 }
Exemplo n.º 3
0
 private void OnPropertyChangedOrDeleted(object sender,
                                         CustomPropertyEventArgs customPropertyEventArgs)
 {
     MarkAsModified();
 }