private void MapFiltered() { var mapper = new ApPmtDistnMapper((XPObjectSpace)ObjectSpace); var batchController = Frame.GetController <BatchDeleteListViewController>(); if (batchController != null) { var criteria = batchController.ActiveFilterCriteria; var filtered = batchController.ActiveFilterEnabled; if (Object.ReferenceEquals(null, criteria) || !filtered) { var message = new Xafology.ExpressApp.SystemModule.GenericMessageBox( "Filter is empty. Do you wish to continue mapping the ENTIRE table?", "Warning", (sender, svp) => mapper.Process(criteria), (sender, svp) => { return; }); } else { mapper.Process(criteria); } } }
private void ConvertCurrency() { var cf = (CashFlow)View.CurrentObject; if (cf.Account == null) { throw new UserFriendlyException("Account must be specified"); } var functionalCurrency = ObjectSpace.GetObjectByKey <Currency>(SetOfBooks.CachedInstance.FunctionalCurrency.Oid); var rateObj = ForexRate.GetForexRateObject(cf.Account.Currency, functionalCurrency, (DateTime)cf.TranDate); string message = string.Format("rate = {0}", rateObj.ConversionRate); var messageBox = new Xafology.ExpressApp.SystemModule.GenericMessageBox(message); }