コード例 #1
0
        /// <summary>
        /// Constructor for SearchResults and retireves all the games related to the search parameters in g
        /// </summary>
        /// <param name="sa">The Store application that created this form.</param>
        /// <param name="g">A game object with all the parameters given to find games</param>
        public SearchResults(GameApplication sa, SearchConditions g)
        {
            this.sa = sa;


            GameRepository gr = new GameRepository();
            List <Game>    lg = gr.RetrieveGames(g);

            InitializeComponent();
            foreach (Game ga in lg)
            {
                string[] s = { ga.Title, ga.Genre, ga.Price.ToString(), ga.IsUsed, ga.StoreId.ToString(), ga.GameId.ToString(), ga.Quantity.ToString(), ga.Platform.ToString() };
                bool     allAreInReceipt = sa.RemoveFromSearch(s);

                if (!allAreInReceipt)
                {
                    this.uxResults.Rows.Add(s);
                }
            }
        }
コード例 #2
0
 /// <summary>
 /// The constructor of the CustomerInput object
 /// </summary>
 /// <param name="ga">The GameApplication object that called this object.</param>
 public CustomerInput(GameApplication ga)
 {
     InitializeComponent();
     this.ga = ga;
 }