void CheckItemNumber() { var calCommission = new CWCalculateCommission(api); calCommission.Closing += delegate { if (calCommission.DialogResult == true) { calc(calCommission.FromDateTime, calCommission.ToDateTime); } }; calCommission.Show(); }
void GeneratePollReport(BankStatementClient selectedItem) { var toFromDateDialog = new CWCalculateCommission(api, fromDate, toDate); toFromDateDialog.Title = Uniconta.ClientTools.Localization.lookup("Reconciliation"); toFromDateDialog.OKButton.Content = Uniconta.ClientTools.Localization.lookup("Generate"); toFromDateDialog.Closing += async delegate { if (toFromDateDialog.DialogResult == true) { fromDate = toFromDateDialog.FromDateTime; toDate = toFromDateDialog.ToDateTime; var source = await CreatePollReportSource(selectedItem); var report = new PollReport(); report.DataSource = new PollReportSource[] { source }; var dockName = string.Concat(Uniconta.ClientTools.Localization.lookup("BankReconciliation"), ":", selectedItem._Account, ", ", selectedItem._Name); AddDockItem(UnicontaTabs.StandardPrintReportPage, new object[] { report }, dockName); } }; toFromDateDialog.Show(); }