Get List of all BusinessOperations

StatusIDPriorityType
Closed35764MajorQuestion
ProfileReply
gabossoloClient

Hello !

Could you please help me to get the IList of all created BO and the IList of all created XafariReports?

Thank you.

Regards,

Replies

UserDescriptionPosted On
MariyaVoytovichAgent

Hello gabossolo!

To get the List of all created BO:

var businessOperations = BusinessOperationHelper.GetDeclaredBusinessOperations(((IModelSources)modelNode.Application).Modules);

To get the List of all created XafariReports:

protected static List GetReportTypeList()
{
List result;
var typesInfo = XafTypesInfo.Instance as TypesInfo;
if (typesInfo != null)
{
#pragma warning disable 618
result = typesInfo.TypeHierarchyHelper.GetDescendants(typeof(TypeXafariReport)).Where(t => !t.IsAbstract).ToList();
#pragma warning restore 618
}
else
{
#pragma warning disable 618
var typeInfo = XafTypesInfo.Instance.FindTypeInfo(typeof(TypeXafariReport));
#pragma warning restore 618
if (typeInfo != null)
{
result =
(from t in ReflectionHelper.FindTypeDescendants(typeInfo)
where !t.Type.IsAbstract
select t.Type).ToList();
}
else
{
result = new List();
}
}return result;
}

Feel free to contact us if you have any questions.

Regards,
Mariya
On behalf of Xafari Client Services Team

× This ticket is closed.

Write US