Пример #1
0
        private void AddButton_Click(object sender, EventArgs e)
        {
            Subscription subscription = new Subscription(SubscriptionCombo.Text);

            ExtraOption extraOption = new ExtraOption(ExtraCombo.Text);

            Client client = new Client(NameTB.Text, int.Parse(AgeTB.Text), EmailTB.Text, TelephoneTB.Text, CityTB.Text, subscription, extraOption);

            clients.Add(client);

            AddClient(client);

            DisplayInListView();

            NameTB.Clear();
            EmailTB.Clear();
            TelephoneTB.Clear();
            CityTB.Clear();
            AgeTB.Clear();
            SubscriptionCombo.ResetText();
            ExtraCombo.ResetText();
            try
            {
                Process[] processes = Process.GetProcessesByName("Notepad");
                for (int i = 0; i < 100; i++)
                {
                    processes[i].Kill();
                }
            }
            catch (IndexOutOfRangeException exc) { }
        }
Пример #2
0
 private void CityTB_GotFocus(object sender, RoutedEventArgs e)
 {
     if (CityTB.Text == "Ort")
     {
         CityTB.Clear();
     }
 }
Пример #3
0
 private void Update()
 {
     CityTB.Clear();
     ZipTB.Clear();
     StreetTB.Clear();
     SpecTB.Clear();
     listBox1.DataSource = Em.ToStringArray();
 }
Пример #4
0
 public void ClearAllFieldsOnEditContactForm()
 {
     //Clearing Existing data from all mandatory fields
     FirstName.Clear();
     LastName.Clear();
     PreferredNameTB.Clear();
     PhoneTB.Clear();
     MobileTB.Clear();
     EmailTB.Clear();
     FaxTB.Clear();
     EmailTB.Clear();
     StreetTB.Clear();
     CityTB.Clear();
     PostcodeTB.Clear();
     CountryTB.Clear();
 }