Monday, November 23, 2009

How To Find Method of Other Modules

Here PurchaseUtils is a Class and have a Static Method ClosingBalance with Three
Argument in a Different Modules Xpert.Procurement
And this method is Used in AccountModules Xpert.Account and we can not used
Xpert.Procurement This DLL in Account Module because AccountModules is Top Level
So we used this Method by this way as given below…..
First here we find the class in which Method is defined here method is defined in
PurchaseUtils Class
Now find the Method and Pass Parameter……

Type TP = ReflectionHelper.FindType("PurchaseUtils");
MethodInfo MI = TP.GetMethod("ClosingBalance");
object[] parameters = new object[3];
parameters[0] = Session;
XPCollection x = new XPCollection(ReflectionHelper.FindType("ItemDetails"));
parameters[1] = DateTime.Now;
parameters[2] = DateTime.Now;
_Amount = (double)(MI.Invoke(null, parameters));

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...