private void FormDeleteCus_Load(object sender, EventArgs e)
 {
     // set initial view for user
     textBoxId.Text         = "";
     labelBookings.Text     = "";
     labelBookingsInfo.Text = "";
     btnShowCustomers.Hide();
     textBoxId.Show();
     labelCusId.Show();
     btnSubmit.Show();
     textBoxId.Focus();
     lblMessage.Text = "No Customers Available";
     lblMessage.Show();
     btnConfirm.Hide();
     btnDeny.Hide();
     clearCustomers();
     if (currentCoord.customerList()[0] != null && currentCoord.customerList()[0] != "")
     {
         // used to view all customers in the customer list
         foreach (string customer in currentCoord.customerList())
         {
             if (customer != "")
             {
                 lblMessage.Hide();
                 string[] customerFields = customer.Split(';');
                 labelNumberInfo.Text += customerFields[0] + "\n\n";
                 labelNameInfo.Text   += customerFields[1] + "\n\n";
                 labelPhoneInfo.Text  += customerFields[2] + "\n\n";
             }
         }
     }
 }
 private void FormViewCus_Load(object sender, EventArgs e)
 {
     lblMessage.Show();
     if (currentCoord.customerList()[0] != null && currentCoord.customerList()[0] != "")
     {
         //view a list of all customers
         foreach (string customer in currentCoord.customerList())
         {
             if (customer != "")
             {
                 lblMessage.Hide();
                 string[] customerFields = customer.Split(';');
                 labelNumberInfo.Text += customerFields[0] + "\n\n";
                 labelNameInfo.Text   += customerFields[1] + "\n\n";
                 labelPhoneInfo.Text  += customerFields[2] + "\n\n";
             }
         }
     }
 }
        private void FormRsvpEvent_Load(object sender, EventArgs e)
        {
            lblMessage.ForeColor = System.Drawing.Color.Maroon;
            clearFields();
            textBoxCusId.Text   = "";
            textBoxEventId.Text = "";
            hideContent();
            lblMessage.Text = "";
            if (currentCoord.customerList()[0] != null && currentCoord.customerList()[0] != "" && currentCoord.eventList()[0] != null && currentCoord.eventList()[0] != "" && currentCoord.canRegister())
            {
                // display a list of both customers and events to choose from to make RSVP
                foreach (string customer in currentCoord.customerList())
                {
                    if (customer != "")
                    {
                        string[] customerFields = customer.Split(';');
                        labelNumberInfo1.Text += customerFields[0] + "\n\n";
                        labelCusNameInfo.Text += customerFields[1] + "\n\n";
                        labelPhoneInfo.Text   += customerFields[2] + "\n\n";
                    }
                }

                foreach (string events in currentCoord.eventList())
                {
                    if (events != "")
                    {
                        string[] eventFields = events.Split(';');
                        labelNumberInfo2.Text   += eventFields[0] + "\n\n";
                        labelEventNameInfo.Text += eventFields[1] + "\n\n";
                        labelVenueInfo.Text     += eventFields[2] + "\n\n";
                    }
                }
                showContent();
            }
            else
            {
                lblMessage.Text = "Must have at least one customer\n and one event to add an RSVP";
            }
        }
Beispiel #4
0
 private void FormViewCusDetails_Load(object sender, EventArgs e)
 {
     // show the initial view of form
     textBoxId.Focus();
     btnShowCustomers.Hide();
     lblMessage.Show();
     lblMessage.Text = "No Customers Available";
     clearCustomers();
     if (currentCoord.customerList()[0] != null && currentCoord.customerList()[0] != "")
     {
         foreach (string customer in currentCoord.customerList())
         {
             // show a list of all customers
             if (customer != "")
             {
                 lblMessage.Hide();
                 string[] customerFields = customer.Split(';');
                 labelNumberInfo.Text += customerFields[0] + "\n\n";
                 labelNameInfo.Text   += customerFields[1] + "\n\n";
                 labelPhoneInfo.Text  += customerFields[2] + "\n\n";
             }
         }
     }
 }