Example #1
0
 private void Cleared()
 {
     FirstNBox.Clear();
     LastNBox.Clear();
     MiddleNBox.Clear();
     PhoneBox.Clear();
     EmailBox.Clear();
     AddressBox1.Clear();
     AddressBox2.Clear();
     CityBox.Clear();
     StateBox.Clear();
     ZipBox.Clear();
     CountryBox.Clear();
 }
Example #2
0
 private void btnNew_Click(object sender, EventArgs e)
 {
     FirstNBox.Clear();
     LastNBox.Clear();
     MiddleNBox.Clear();
     PhoneBox.Clear();
     EmailBox.Clear();
     AddressBox1.Clear();
     AddressBox2.Clear();
     CityBox.Clear();
     StateBox.Clear();
     ZipBox.Clear();
     CountryBox.Clear();
 }
        private void AddBtn_Click(object sender, RoutedEventArgs e)
        {
            string ItemName   = ItemBox.Text;
            string DateOfSale = DateBox.Text;
            string Country    = CountryBox.Text;
            string Currency   = CurrencyBox.Text;

            if (!float.TryParse(PriceBox.Text, out float NetPrice) & float.TryParse(VATbox.Text, out float VAT))
            {
                MessageBox.Show("Net Price and VAT fields can only contain numbers!");
            }
            con.InsertSales(ItemName, Country, Currency, DateOfSale, NetPrice, VAT);
            MessageBox.Show("Sale has been added.");
            ItemBox.Clear();
            DateBox.Clear();
            CountryBox.Clear();
            CurrencyBox.Clear();
            PriceBox.Clear();
            VATbox.Clear();
        }
Example #4
0
 private void Delbutton_Click(object sender, EventArgs e)
 {
     if (neadlyUpdate)
     {
         bai.RemoveAt(id);
         this.Close();
     }
     else
     {
         NameBox.Clear();
         Yearnumber.Value = Yearnumber.Maximum;
         for (int i = 0; i < GenersListBox.Items.Count; i++)
         {
             GenersListBox.SetItemChecked(i, false);
         }
         CountryBox.Clear();
         NumbEpisodNumber.Value = 1;
         ProducertextBox.Clear();
         OriginalAuthertextBox.Clear();
         StudioVoicetextBox.Clear();
         StudiotextBox.Clear();
     }
 }
 public void SetChooseCountry(string country)
 {
     CountryBox.SelectByText(country);
 }