Beispiel #1
0
        // Display new form Closed_Auctions
        private void closedToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.IsMdiContainer = true;

            Closed_Auctions f = new Closed_Auctions();

            f.MdiParent = this;
            f.Show();
        }
Beispiel #2
0
        private void auctionbttn_Click(object sender, EventArgs e)
        {
            if (ProdSellerLV.SelectedItems.Count == 1)
            {
                ListViewItem item = ProdSellerLV.SelectedItems[0];

                int productCode = Convert.ToInt32(item.SubItems[0].Text);


                if (getStatus(productCode) == "Auction")
                {
                    Open_Auctions f = new Open_Auctions(productCode);
                    f.Show();
                }

                else if (getStatus(productCode) == "Sold")
                {
                    Closed_Auctions f = new Closed_Auctions(productCode);
                    f.Show();
                }


                else if (hasAuctionHistory(productCode))
                {
                    Closed_Auctions f = new Closed_Auctions(productCode);
                    f.Show();
                }

                else
                {
                    MessageBox.Show("This product does not have an auction history.", "Error alert",
                                    MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }

            else
            {
                MessageBox.Show("You need to select a product to access its auction.", "Error alert",
                                MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }