private void BT_AddOffer_Click(object sender, RoutedEventArgs e)
 {
     Classes.OfferManager offerManager = new Classes.OfferManager();
     Classes.Validation valid = new Classes.Validation();
     if (valid.IsTextNumeric(TB_Price.Text) && valid.IsNumberInRange(0, 2147483645, TB_Price.Text) && valid.DateTest(TB_Price.Text))
     {
         if (offerManager.AddOffer(listID[CB_Listing.SelectedIndex], clientsID[CB_Client.SelectedIndex], Convert.ToInt32(TB_Price.Text), CB_Status.SelectedIndex, DP_Date.Text))
         {
             DisplayNotifyBox("Offer added", "The offer from " + CB_Client.SelectedItem + " has been added", 5);
             ClearAddOfferOverlay();
         }
         else
         {
             DisplayNotifyBox("ERROR", "Offer could not be added", 5);
         }
     }
     else
     {
         DisplayNotifyBox("ERROR", "Please ensure the price is numeric and lower than 2 147 483 645, and that the date is in the valid format", 5);
     }
 }
 private void BT_AddOffer_Click(object sender, RoutedEventArgs e)
 {
     Classes.OfferManager offerManager = new Classes.OfferManager();
     Classes.Validation   valid        = new Classes.Validation();
     if (valid.IsTextNumeric(TB_Price.Text) && valid.IsNumberInRange(0, 2147483645, TB_Price.Text) && valid.DateTest(TB_Price.Text))
     {
         if (offerManager.AddOffer(listID[CB_Listing.SelectedIndex], clientsID[CB_Client.SelectedIndex], Convert.ToInt32(TB_Price.Text), CB_Status.SelectedIndex, DP_Date.Text))
         {
             DisplayNotifyBox("Offer added", "The offer from " + CB_Client.SelectedItem + " has been added", 5);
             ClearAddOfferOverlay();
         }
         else
         {
             DisplayNotifyBox("ERROR", "Offer could not be added", 5);
         }
     }
     else
     {
         DisplayNotifyBox("ERROR", "Please ensure the price is numeric and lower than 2 147 483 645, and that the date is in the valid format", 5);
     }
 }