private void button1_Click(object sender, EventArgs e)
        {
            string date = dateTimePicker1.Value.Year.ToString() + '-' + dateTimePicker1.Value.Month.ToString() + '-' + dateTimePicker1.Value.Day.ToString();

            MySqlOperations.Insert_Update(MySqlQueries.Insert_Zakaz, ID_Org, date);
            MySqlOperations.Select_Text(MySqlQueries.Select_Last_Insert, ref ID_Zakaza);
            groupBox1.Visible = true;
            groupBox2.Visible = true;
            MySqlOperations.Select_DataGridView(MySqlQueries.Select_Sostav_CUP, dataGridView1, ID_Zakaza);
            MySqlOperations.Select_DataGridView(MySqlQueries.Select_Sostav_GP, dataGridView2, ID_Zakaza);
        }
예제 #2
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (textBox1.Text != "" && textBox2.Text != "")
     {
         MySqlOperations.Insert_Update(MySqlQueries.Insert_Organizacii, null, textBox1.Text, textBox2.Text);
         this.Close();
     }
     else
     {
         MessageBox.Show("Поля не заполнены.", "Добавление", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
예제 #3
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (textBox1.Text != "" && comboBox1.Text != "" && comboBox2.Text != "" && textBox2.Text != "")
     {
         MySqlOperations.Insert_Update(MySqlQueries.Insert_Product, null, MySqlOperations.Select_ID_From_ComboBox(MySqlQueries.Select_Sklad_ID, comboBox1.Text), textBox1.Text, comboBox2.Text, textBox2.Text.Replace(',', '.'));
         this.Close();
     }
     else
     {
         MessageBox.Show("Поля не заполнены.", "Добавление", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
        private void button1_Click(object sender, EventArgs e)
        {
            string date = dateTimePicker1.Value.Year.ToString() + '-' + dateTimePicker1.Value.Month.ToString() + '-' + dateTimePicker1.Value.Day.ToString();

            MySqlOperations.Insert_Update(MySqlQueries.Insert_Zayavka_GP, ID_Zakaza, date);
            MySqlOperations.Select_Text(MySqlQueries.Select_Last_Insert, ref ID_Zayavki_GP);
            MySqlOperations.Insert_Update(MySqlQueries.Insert_Zayavka_CUP, ID_Zakaza, date);
            MySqlOperations.Select_Text(MySqlQueries.Select_Last_Insert, ref ID_Zayavki_CUP);
            for (int i = 0; i < dataGridView1.Rows.Count; i++)
            {
                MySqlOperations.Insert_Update(MySqlQueries.Insert_Sostav_Zayavki, ID_Zayavki_GP, MySqlOperations.Select_ID_From_ComboBox(MySqlQueries.Select_Product_ID, dataGridView1.Rows[i].Cells[1].Value.ToString()), dataGridView1.Rows[i].Cells[2].Value.ToString());
            }
            for (int i = 0; i < dataGridView2.Rows.Count; i++)
            {
                MySqlOperations.Insert_Update(MySqlQueries.Insert_Sostav_Zayavki, ID_Zayavki_CUP, MySqlOperations.Select_ID_From_ComboBox(MySqlQueries.Select_Product_ID, dataGridView2.Rows[i].Cells[1].Value.ToString()), dataGridView2.Rows[i].Cells[2].Value.ToString());
            }
            MySqlOperations.Insert_Update(MySqlQueries.Update_Identify_Zakaz, ID_Zakaza);
            this.Close();
        }
예제 #5
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (comboBox1.Text != "")
     {
         string output = string.Empty;
         MySqlOperations.Select_Text(MySqlQueries.Select_Product_ID, ref output, null, comboBox1.Text);
         MySqlOperations.Insert_Update(MySqlQueries.Insert_Sostav_Zakaza, ID, output, numericUpDown1.Value.ToString().Replace(',', '.').ToString());
         this.Close();
     }
     else
     {
         MessageBox.Show("Выберите продукцию.", "Добавление", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }