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); }
protected void ReportGridViewCustomCallback(object sender, ASPxGridViewCustomCallbackEventArgs e) { CallbackParameter parameter = CallbackParameter.Parse(e.Parameters); AgedBalancesReportRecord record = (AgedBalancesReportRecord)reportGridView.GetRow(parameter.RowIndex); RedirectionParameter redirectionParameter = new RedirectionParameter(parameter.FieldName, record.ClientNumber, record.Id); ISecurityManager securityManager = SecurityManagerFactory.Create(Context.User as CffPrincipal, SessionWrapper.Instance.Scope); Redirector redirector = new Redirector(RedirectionService.Create(this, securityManager)); redirector.Redirect(redirectionParameter); }
protected void CreditSearchGridViewCustomCallback(object sender, ReportGridViewCustomCallbackEventArgs e) { CallbackParameter parameter = CallbackParameter.Parse(e.Parameters); CreditNoteSearchResult creditNote = (CreditNoteSearchResult)creditSearchGridView.GetRow(parameter.RowIndex); RedirectionParameter redirectionParameter = new RedirectionParameter(parameter.FieldName, creditNote.ClientId, creditNote.CustomerId, creditNote.Batch); ISecurityManager securityManager = SecurityManagerFactory.Create(Context.User as CffPrincipal, this.CurrentScope()); Redirector redirector = new Redirector(RedirectionService.Create(this, securityManager)); redirector.Redirect(redirectionParameter); }
protected void Page_Load(object sender, EventArgs e) { ConfigureGridColumns(); MonthRangePicker.Update += MonthRangePickerUpdate; ISecurityManager securityManager = SecurityManagerFactory.Create(Context.User as CffPrincipal, this.CurrentScope()); presenter = new TransactionArchivePresenter(this, RepositoryFactory.CreateTransactionRepository(), RedirectionService.Create(this, securityManager)); presenter.InitializeForScope(this.CurrentScope()); int?custId = (SessionWrapper.Instance.Get == null) ? ((QueryString.ViewIDValue == null)? 0 : SessionWrapper.Instance.GetSession(QueryString.ViewIDValue).CustomerFromQueryString.Id) : SessionWrapper.Instance.Get.CustomerFromQueryString.Id; if (IsPostBack) { presenter.LoadTransactionArchive(MonthRangePicker.DateRange, (int)custId, ChkBoxTransactionInvoices.Checked); } else { presenter.LoadTransactionArchive(MonthRangePicker.DateRange, (int)custId, ChkBoxTransactionInvoices.Checked); } TransactionsLink.HRef = "~/Transactions.aspx" + QueryStringParameters; TransactionHistoryLink.HRef = "~/TransactionHistory.aspx" + QueryStringParameters; TransactionSearchLink.HRef = "~/TransactionSearch.aspx" + QueryStringParameters; }
protected void Page_Load(object sender, EventArgs e) { ConfigureGridColumns(); ISecurityManager securityManager = SecurityManagerFactory.Create(Context.User as CffPrincipal, this.CurrentScope()); presenter = new TransactionsPresenter(this, RepositoryFactory.CreateTransactionRepository(), RedirectionService.Create(this, securityManager)); presenter.InitializeForScope(this.CurrentScope()); int customerId = (SessionWrapper.Instance.Get != null) ? SessionWrapper.Instance.Get.CustomerFromQueryString.Id : SessionWrapper.Instance.GetSession(QueryString.ViewIDValue).CustomerFromQueryString.Id; if (IsPostBack) { if (ChkBoxTransactionInvoices.Checked) { presenter.LoadCurrentTransactionsInvoices(customerId); } else { presenter.LoadCurrentTransactions(customerId); } } else { presenter.LoadCurrentTransactions(customerId); } TransactionCurrentLink.Visible = false; TransactionArchiveLink.HRef = "~/TransactionArchive.aspx" + QueryStringParameters; TransactionHistoryLink.HRef = "~/TransactionHistory.aspx" + QueryStringParameters; TransactionSearchLink.HRef = "~/TransactionSearch.aspx" + QueryStringParameters; }
protected void Page_Load(object sender, EventArgs e) { targetName = ""; MonthRangePicker.Update += ParameterUpdate; ISecurityManager securityManager = SecurityManagerFactory.Create(Context.User as CffPrincipal, this.CurrentScope()); presenter = new TransactionHistoryPresenter(this, RepositoryFactory.CreateTransactionRepository(), RedirectionService.Create(this, securityManager), securityManager); presenter.LockDown(); presenter.InitializeForScope(this.CurrentScope()); cffGGV_TransactionGridView.RowCommand += cffGGV_TransactionGridView_RowCommand; ChkBoxTransactionInvoices.Checked = false; ChkBoxTransactionInvoices.Visible = false; //removed as per marty's request if (IsPostBack) { // start ref:CFF-18 if (SessionWrapper.Instance.Get == null && QueryString.ViewIDValue != null) { targetName = ": " + SessionWrapper.Instance.GetSession(QueryString.ViewIDValue).ClientFromQueryString.Name; } else if (SessionWrapper.Instance.Get.ClientFromQueryString != null) { targetName = ": " + SessionWrapper.Instance.Get.ClientFromQueryString.Name; } if (SessionWrapper.Instance.Get == null && QueryString.ViewIDValue != null) { if (targetName != null || !targetName.Equals("")) { targetName += " / "; targetName = string.Concat(targetName, SessionWrapper.Instance.GetSession(QueryString.ViewIDValue).CustomerFromQueryString.Name); } else { targetName = ": " + SessionWrapper.Instance.GetSession(QueryString.ViewIDValue).CustomerFromQueryString.Name; } } else if (SessionWrapper.Instance.Get.CustomerFromQueryString != null) { if (targetName != null || !targetName.Equals("")) { targetName += " / "; targetName = string.Concat(targetName, SessionWrapper.Instance.Get.CustomerFromQueryString.Name); } else { targetName = ": " + SessionWrapper.Instance.Get.CustomerFromQueryString.Name; } } // end if (SessionWrapper.Instance.Get == null && QueryString.ViewIDValue != null) { presenter.LoadTransactionHistory(MonthRangePicker.DateRange, SessionWrapper.Instance.GetSession(QueryString.ViewIDValue).CustomerFromQueryString.Id, ChkBoxTransactionInvoices.Checked); } else if (SessionWrapper.Instance.Get.IsCustomerSelected) { presenter.LoadTransactionHistory(MonthRangePicker.DateRange, SessionWrapper.Instance.Get.CustomerFromQueryString.Id, ChkBoxTransactionInvoices.Checked); } else { if (ViewState["Transactions"] != null) { ShowTransactionHistory(ViewState["Transactions"] as IList <HistoricalTransaction>); } } } SearchLink.HRef = "~/TransactionSearch.aspx" + QueryStringParameters; currentTransactionsLink.InnerHtml = "<a href=\"Transactions.aspx" + Server.HtmlDecode(QueryStringParameters) + "\">Current</a>"; transactionArchiveLink.InnerHtml = "<a href=\"TransactionArchive.aspx" + Server.HtmlDecode(QueryStringParameters) + "\">Archive</a>"; }