Example #1
0
 private void btnStatus_Click(object sender, EventArgs e)
 {
     try
     {
         if (msh.GetCampingInfo(Convert.ToInt32(cbProductsSold.SelectedItem)).Count > 0)
         {
             foreach (string item in msh.GetCampingInfo(Convert.ToInt32(cbProductsSold.SelectedItem.ToString())))
             {
                 listBox3.Items.Add(item);
             }
         }
         else
         {
             MessageBox.Show("This Camping Spot is Free");
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }