private string RephaseAction_Execute(object sender, SimpleActionExecuteEventArgs e, bool isRootSender = false) { var sw = new System.Diagnostics.Stopwatch(); sw.Start(); ObjectSpace.CommitChanges(); var os = (XPObjectSpace)Application.CreateObjectSpace(); var paramObj = View.CurrentObject as CashFlowFixParam; if (paramObj != null) { var algo = new FixCashFlowsAlgorithm(os, paramObj); algo.Rephase(); } sw.Stop(); var messageText = string.Format("Cash Flows were successfully 'Rephased'. Elapsed Time = {0} seconds", Math.Round(sw.Elapsed.TotalSeconds, 2)); if (isRootSender) { new Xafology.ExpressApp.SystemModule.GenericMessageBox( messageText, "Cash Flow Rephase SUCCESS"); } return(string.Format(messageText, Math.Round(sw.Elapsed.TotalSeconds, 2))); }
public static void FixCashFlows(XPObjectSpace objSpace, CashFlowFixParam paramObj) { var algo = new FixCashFlowsAlgorithm(objSpace, paramObj); algo.ProcessCashFlows(); }