Monday, November 23, 2009

Associassion Through Module Base with the help of Interface

Here I have two modules Xpert.Account and Xpert.Statutory. In Account Modules.cs I
have to add two Properties
FormsToIssue, FormsToRecieve in a Class which have Implemented ICST Interface
public sealed partial class InModule : ModuleBase
{
public InModule()
{
InitializeComponent();
}

public override void CustomizeTypesInfo(DevExpress.ExpressApp.DC.ITypesInfo typesInfo)
{
base.CustomizeTypesInfo(typesInfo);
if (Application == null || Application.XPDictionary == null) return;
XPDictionary xpDCT = XafTypesInfo.XpoTypeInfoSource.XPDictionary;
foreach (XPClassInfo item in Application.XPDictionary.Classes)
{
if (item.ClassType != null && XafTypesInfo.Instance.FindTypeInfo(item.ClassType).ImplementsICST())
{
classInfo = item;
if (XafTypesInfo.Instance.FindTypeInfo(classInfo.ClassType).ImplementsICST())
{
if (classInfo.FindMember(classInfo.ClassType.Name) == null && classInfo.BaseClass.FindMember(classInfo.ClassType.Name) == null)
{
classInfo.CreateMember("FormsToIssue", typeof(StatutoryForms), new VisibleInListViewAttribute(false), new VisibleInLookupListViewAttribute(false));
classInfo.CreateMember("FormsToRecieve", typeof(StatutoryForms), new VisibleInListViewAttribute(false), new VisibleInLookupListViewAttribute(false));
}
XafTypesInfo.Instance.RefreshInfo(classInfo.ClassType);
}}}}}}
Here ICST is a Interface that is attached with various Class in that class two
property will be added

No comments:

Post a Comment

Mat Table Angular

Mat Table in Angular Mat table is used to display data . its a material designed styled data-table . For using Material Table MatTableMo...