protected void TransactionGridViewCustomCallback(object sender, ReportGridViewCustomCallbackEventArgs e) { CallbackParameter parameter = CallbackParameter.Parse(e.Parameters); ArchivedTransaction transaction = (ArchivedTransaction)TransactionGridView.GetRow(parameter.RowIndex); var redirectionParameter = new RedirectionParameter(parameter.FieldName, SessionWrapper.Instance.Get.ClientFromQueryString.Id, SessionWrapper.Instance.Get.CustomerFromQueryString.Id, transaction.Batch); ISecurityManager securityManager = SecurityManagerFactory.Create(Context.User as CffPrincipal, SessionWrapper.Instance.Get.Scope); Redirector redirector = new Redirector(RedirectionService.Create(this, securityManager)); redirector.Redirect(redirectionParameter); }
public IList <ArchivedTransaction> LoadTransactionArchive(DateRange dateRange, int customerId, bool bInvoicesOnly) { ArgumentChecker.ThrowIfNull(dateRange, "dateRange"); int whichTrns = 10; if (bInvoicesOnly == true) { whichTrns = 11; } DataTableCollection transactionDataTables = null; DataSet theDS = customer.getAllTransactions(customerId, "All", whichTrns, 0, dateRange.EndDate.ToYearMonthValue(), dateRange.NumberOfMonths, dateRange.EndDate.Value.DateTime); if (theDS != null) { if (theDS.Tables != null) { transactionDataTables = theDS.Tables; } } IList <ArchivedTransaction> archivedTransactions = new List <ArchivedTransaction>(); if (transactionDataTables != null) { DataRowReader reader = new DataRowReader(transactionDataTables[0].Rows); while (reader.Read()) { var transaction = new ArchivedTransaction(reader.ToInteger("TrueTrnID"), reader.ToDate("Dated"), reader.ToNullableDate("LastRec"), reader.ToDate("Factored"), reader.ToString("Type").Trim(), reader.ToString("Number"), reader.ToString("Reference"), reader.ToDecimal("Amount"), reader.ToString("Status"), reader.ToInteger("Batch"), reader.ToString("CurrentTrnNotes"), //add 14072012 as per marty's request customerId); archivedTransactions.Add(transaction); } } return(archivedTransactions); }