예제 #1
0
        private void addClient_Click(object sender, EventArgs e)
        {
            int discount = Convert.ToInt32(discountTextBox.Text);
            int pasport  = Convert.ToInt32(pasportTextBox.Text);

            //TODO: Дописть добавление клиента
            string cmdText = $"INSERT INTO Clients ([Фамилия], [Имя], [Отчество], [Адрес], [Паспорт], [Дата регистрации], [Предоставить скидку]) VALUES (" +
                             $"'" + secondNameTextBox.Text + "'," +
                             " '" + firstNameTextBox.Text + "'," +
                             " '" + patronymicTextBox.Text + "'," +
                             " '" + addressTextBox.Text + "'," +
                             " '" + pasport + "'," +
                             " '" + DateTime.Now + "'," +
                             " '" + discount + "')";

            TableMenager moviesTable = new TableMenager();

            moviesTable.ExecuteRequest(cmdText);
        }
예제 #2
0
        private void complite_Click(object sender, EventArgs e)
        {
            pictureBox1.Image.Save($@"{Application.StartupPath}\FilmsImage\{ImageName}.jpeg", System.Drawing.Imaging.ImageFormat.Jpeg);

            string imageIndex = ImageName.ToString();
            int    price      = Convert.ToInt32(priceTextBox.Text);

            string request = $"INSERT INTO Films ([Код], [Название], [Описание], [Цена], [Режиссёр], [Страна]) VALUES (" +
                             $"'" + imageIndex + "'," +
                             " '" + nameTextBox.Text + "'," +
                             " '" + descriptRichBox.Text + "'," +
                             " '" + price + "'," +
                             " '" + directorTextBox.Text + "'," +
                             " '" + CountryTextBox.Text + "')";

            TableMenager moviesTable = new TableMenager();

            moviesTable.ExecuteRequest(request);

            MessageBox.Show("Фильм добавлен!", "Готово");
            this.Close();
        }
 public Statistics(string login)
 {
     tableMenager = new TableMenager();
     Login        = login;
 }