Ejemplo n.º 1
0
        //pretty much the same as above but returns a spot based on holdee id
        public Spot spotcid_getter(string the_CID)
        {
            Spot currentQ = spothead;

            //transverese and check every spot
            while (currentQ != null)
            {
                if (currentQ.customerID == the_CID)
                {
                    return(currentQ);
                }
                currentQ = currentQ.nextspot;
            }

            return(null);
        }
Ejemplo n.º 2
0
        //pretty much the same as above but returns a spot based on holdee id
        public Spot spothid_getter(string the_ID)
        {
            Spot currentg = spothead;

            //transverese and check every spot
            while (currentg != null)
            {
                if (currentg.holdeeID == the_ID)
                {
                    return(currentg);
                }
                currentg = currentg.nextspot;
            }

            return(null);
        }
Ejemplo n.º 3
0
 private void Combobox_Button_Click(object sender, EventArgs e)
 {
     if (this.comboBox1.Text != null)
     {
         this.label5.Show();
         this.label6.Show();
         this.label7.Show();
         this.label8.Show();
         this.label9.Show();
         this.button2.Show();
         this.textBox3.Show();
         Spot view = EvtDB.get_holdee_spot(this.comboBox1.Text);
         this.label5.Text   = view.get_cost().ToString();
         this.textBox3.Text = view.get_spotdesc();
         this.label7.Text   = this.comboBox1.Text;
     }
 }
Ejemplo n.º 4
0
        //check if a customer has already bought a spot
        public Boolean check_dupcust(string dup_Cid)
        {
            Spot currrentd = spothead;

            while (currrentd != null)
            {
                //check if it is dup and if so return true
                if (currrentd.customerID == dup_Cid)
                {
                    return(true);
                }

                //else transverse
                currrentd = currrentd.nextspot;
            }


            return(false);
        }
Ejemplo n.º 5
0
        private void Purchase_Button_Click(object sender, EventArgs e)
        {
            Search NewForm = new Search(ActDB, EvtDB, user);

            NewForm.Show();
            NewForm.Left = this.Left;
            NewForm.Top  = this.Top;
            NewForm.Size = this.Size;
            if (EvtDB.check_spot(user.get_email()) == false)
            {
                Spot view = EvtDB.get_holdee_spot(this.label7.Text);
                view.set_taken(user.get_email());
                NewForm.label5.Show();
            }
            else
            {
                NewForm.label7.Show();
            }

            this.Hide();
        }
Ejemplo n.º 6
0
 public SpotHoldee(account_head Account_Database, Event_Controller Event_Database, account_info account, Spot view)
 {
     ActDB   = Account_Database;
     EvtDB   = Event_Database;
     user    = account;
     current = view;
     InitializeComponent();
 }
Ejemplo n.º 7
0
 //A constructor
 public Event()
 {
     number_of_spots  = 0;
     non_hidden_spots = 0;
     spothead         = null;
 }