示例#1
0
        private void button1_Click(object sender, EventArgs e)
        {
            string input;
            string nume    = authorInput.Text;
            string prenume = textBox1.Text;

            AutorDTO autor = new AutorDTO();

            autor.nume    = nume;
            autor.prenume = prenume;

            input = genderInput.Text;
            GenDTO gen = new GenDTO();

            gen.descriere = input;

            input = titleInput.Text;
            CarteDTO carte = new CarteDTO();

            carte.titlu    = input;
            carte.GenDto   = gen;
            carte.AutorDto = autor;

            input = numberInput.Text;

            BookServiceClient bookService = new BookServiceClient();

            bookService.BuyBooks(carte, Int16.Parse(input));

            ((MainPage)this.Owner).MainPage_Load(null, null);
            this.Close();
        }