Exemplo n.º 1
0
        private void button6_Click(object sender, EventArgs e)
        {
            Ubytiya ubytiya = new Ubytiya(MySqlQueries, MySqlOperations, ID);

            ubytiya.button1.Visible         = true;
            ubytiya.button3.Visible         = false;
            ubytiya.dateTimePicker1.MinDate = DateTime.Parse(dataGridView1.Rows[dataGridView1.Rows.Count - 1].Cells[2].Value.ToString());
            ubytiya.dateTimePicker1.MaxDate = dateTimePicker2.Value;
            ubytiya.ShowDialog();
            MySqlOperations.Select_DataGridView(MySqlQueries.Select_Ubytiya_Kartochki, dataGridView2, ID);
        }
Exemplo n.º 2
0
        private void Proverka_Ostatka()
        {
            string output = string.Empty;

            MySqlOperations.Select_Text(MySqlQueries.Select_Kartochka_Ostatok, ref output, ID);
            if (decimal.Parse(output) == decimal.Parse("0,00"))
            {
                if (MessageBox.Show("Необходимое количество отходов уже собрано." + '\n' + "Желаете отправить собранные отходы на утилизацию?", "Вопрос", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                {
                    Ubytiya ubytiya = new Ubytiya(MySqlQueries, MySqlOperations, ID);
                    ubytiya.button1.Visible         = true;
                    ubytiya.button3.Visible         = false;
                    ubytiya.dateTimePicker1.MinDate = DateTime.Parse(dataGridView1.Rows[dataGridView1.Rows.Count - 1].Cells[2].Value.ToString());
                    ubytiya.dateTimePicker1.MaxDate = dateTimePicker2.Value;
                    ubytiya.ShowDialog();
                    MySqlOperations.Select_DataGridView(MySqlQueries.Select_Ubytiya_Kartochki, dataGridView2, ID);
                    button4.Enabled = false;
                    button5.Enabled = false;
                    button6.Enabled = false;
                    button7.Enabled = false;
                    button8.Enabled = false;
                }
            }
        }