Exemple #1
0
        private void buy_Click(object sender, RoutedEventArgs e)
        {
            if (buf.Count <= 0)
            {
                return;
            }
            if (buf.Count <= 0)
            {
                return;
            }
            AutorizationBuy aut = new AutorizationBuy();

            aut.ShowDialog();
            if (aut.DialRez)
            {
                for (int i = 0; i < buf.Count; i++)
                {
                    room[buf[i].W][buf[i].H].butt.IsEnabled = false;
                    room[buf[i].W][buf[i].H].ISBuy          = true;
                    room[buf[i].W][buf[i].H].Owner          = aut.NameData;
                    room[buf[i].W][buf[i].H].Mobile         = aut.PhoneData;
                    room[buf[i].W][buf[i].H].Card           = aut.Card;

                    if (MessageBoxResult.Yes == MessageBox.Show("Хотите напечатать билет " + (buf[i].W + 1) + " ряд " + buf[i].H + " место?", "Внимание", MessageBoxButton.YesNo))
                    {
                        Print p = new Print(namef, "" + HOUR + ":" + MIN, buf[i].W + 1, buf[i].H, room[buf[i].W][buf[i].H].Cost);
                        p.ShowDialog();
                    }
                }
                buf.Clear();
            }
        }
        private void buy_Click(object sender, RoutedEventArgs e)
        {
            if (buf.Count <= 0)
                return;
            if (buf.Count <= 0)
                return;
            AutorizationBuy aut = new AutorizationBuy();
            aut.ShowDialog();
            if (aut.DialRez)
            {

                for (int i = 0; i < buf.Count; i++)
                {
                    room[buf[i].W][buf[i].H].butt.IsEnabled = false;
                    room[buf[i].W][buf[i].H].ISBuy = true;
                    room[buf[i].W][buf[i].H].Owner = aut.NameData;
                    room[buf[i].W][buf[i].H].Mobile = aut.PhoneData;
                    room[buf[i].W][buf[i].H].Card = aut.Card;

                     if (MessageBoxResult.Yes == MessageBox.Show("Хотите напечатать билет "+(buf[i].W+1)+" ряд "+buf[i].H+" место?", "Внимание", MessageBoxButton.YesNo))
                        {
                            Print p = new Print(namef, ""+HOUR+":"+MIN, buf[i].W+1, buf[i].H, room[buf[i].W][buf[i].H].Cost);
                            p.ShowDialog();
                        }
                }
                buf.Clear();
            }
        }