Exemplo n.º 1
0
        public void Registrate_Button_Click(object sender, EventArgs e)
        {
            Registraciya regis1 = new Registraciya();

            regis1.Show();
            Registration_Window.Enabled   = false;
            Registration_Window.BackColor = Color.Gray;
            regis.BackColor             = Color.Gray;
            Registrate_Button.BackColor = Color.Gray;
            Registrate_Button.ForeColor = Color.DimGray;
            Vhod_Button.BackColor       = Color.Gray;
            Vhod_Button.ForeColor       = Color.DimGray;
            Cancel_Button.BackColor     = Color.Gray;
            Cancel_Button.ForeColor     = Color.DimGray;
        }
Exemplo n.º 2
0
        private void button6_Click(object sender, EventArgs e)
        {
            int    count = 0;
            string IDzak = dataGridView5.CurrentRow.Cells[0].Value.ToString();

            for (int j = 0; j < dataGridView3.RowCount; j++)
            {
                for (int i = 0; i < dataGridView3.ColumnCount; i++)
                {
                    if (dataGridView3[i, j].Value != null)
                    {
                        count++;
                        Gl.post = dataGridView3[5, j].Value.ToString();
                        Gl.summ = dataGridView3[1, j].Value.ToString();
                        Gl.ID   = dataGridView3[0, j].Value.ToString();
                        Tovar(dataGridView3[3, j].Value.ToString());
                        Registraciya re = new Registraciya();
                        re.textBoxName.Text = namr;
                        re.ShowDialog();
                        break;
                    }
                }
            }
            DialogResult resolt = MessageBox.Show("Изменить статус?", "Сообщение", MessageBoxButtons.YesNo);

            if (resolt == DialogResult.No)
            {
                return;
            }
            {
                ConnectionClass ConCheck = new ConnectionClass();
                ConCheck.Connection_Options();
                SqlConnection connection = new SqlConnection(ConCheck.ConnectString);
                connection.Open();
                SqlCommand command2 = new SqlCommand("UPDATE Zakaz_tovara SET Statysa_ID = '3' WHERE ID_Zakaza ='" + IDzak + "'", connection);
                command2.ExecuteNonQuery();
                connection.Close();
                Upda();
            }
        }