예제 #1
0
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            if (tbName.Text.Length < 3 || cbPol.SelectedValue == null || tbTel.Text.Length < 5 || picker.SelectedDate == null)
            {
                MessageBox.Show("Неправильно введенные данные");
                return;
            }


            workDataFunk w = new workDataFunk();


            if (w.AddPeople(tbName.Text, (DateTime)picker.SelectedDate, cbPol.SelectedValue.ToString(), tbmail.Text, tbTel.Text))
            {
                BuyAbon b;
                if (nextAction)
                {
                    b = new BuyAbon(false, w.GetCard(tbName.Text));
                }
                else
                {
                    b = new BuyAbon(true, w.GetCard(tbName.Text));
                }
                b.ShowDialog();
                DialogResult = true;
            }
        }
예제 #2
0
        //buy abon
        private void MenuItem_Click_11(object sender, RoutedEventArgs e)
        {
            BuyAbon sho = new BuyAbon(false, 0);

            sho.ShowDialog();
        }