public TransactionSearchPresenter(ITransactionSearchView view, ITransactionSearchRepository transactionSearchRepository, ISearchScopeManager searchScopeManager) { ArgumentChecker.ThrowIfNull(view, "view"); ArgumentChecker.ThrowIfNull(searchScopeManager, "searchScopeManager"); ArgumentChecker.ThrowIfNull(transactionSearchRepository, "transactionSearchRepository"); this.transactionSearchRepository = transactionSearchRepository; this.view = view; this.searchScopeManager = searchScopeManager; }
protected void Page_Load(object sender, EventArgs e) { ViewState.Add("ViewID", QueryString.ViewIDValue); targetName = ""; ISearchScopeManager searchScopeManager = SearchScopeManagerFactory.Create(this.CurrentScope(), Context.User as CffPrincipal); presenter = new TransactionSearchPresenter(this, RepositoryFactory.CreateTransactionSearchRepository(), searchScopeManager); ConfigureGrids(); if (!IsPostBack) { PopulateTransactionTypeDropDownList(); presenter.PopulateSearchScopeDropDownList(); ShowHideTabNavigations(); transactionSearchGridView.Visible = false; creditSearchGridView.Visible = false; } else { SearchLabel.Visible = false; TransactionSearchType transactionSearchType = ((TransactionSearchType) Enum.Parse(typeof(TransactionSearchType), TransactionTypeDropDownList.SelectedValue)); if (transactionSearchType == TransactionSearchType.Invoices) { DisplayMatchedTransactions(ViewState["transactions"] as IList <TransactionSearchResult>); } else { DisplayMatchedCreditNotesTransactions( ViewState["creditNotesTransactions"] as IList <CreditNoteSearchResult>); } } currentTransactionsLink.InnerHtml = "<a href=\"Transactions.aspx" + Server.HtmlDecode(QueryStringParameters) + "\">Current</a>"; transactionArchiveLink.InnerHtml = "<a href=\"TransactionArchive.aspx" + Server.HtmlDecode(QueryStringParameters) + "\">Archive</a>"; transactionHistoryLink.InnerHtml = "<a href=\"TransactionHistory.aspx" + Server.HtmlDecode(QueryStringParameters) + "\">History</a>"; }