コード例 #1
0
 /// <summary>
 /// Deletes the specified entity.
 /// </summary>
 /// <param name="entity">
 /// The entity to delete.
 /// </param>
 public void DeleteEntity(IEntity entity)
 {
     // Delete entity based on the entity type.
     if (entity is Form)
     {
         Forms.Delete(entity.Id);
     }
     else if (entity is Layout)
     {
         Layouts.Delete(entity.Id);
     }
     else if (entity is Validation)
     {
         Validations.Delete(entity.Id);
     }
     else if (entity is DataValue)
     {
         DataValues.Delete(entity.Id);
     }
     else if (entity is Folder)
     {
         Folders.Delete(entity.Id);
     }
     else if (entity is ConfiguredForm)
     {
         ConfiguredForms.Delete(entity.Id);
     }
 }