Exemple #1
0
        private void Form_operator_Load(object sender, EventArgs e)
        {
            test          = new Test(this);
            this.Location = new Point((screen.X / 2) - (this.Width / 2), (screen.Y / 2) - (this.Height / 2) - 150);

            form2 = new Form_car_number(this);
            form2.Show();
            formC = new Form_close(this);
            formC.Show();
            L = new Log(this);
            L.Show();
            textBox_price.Text = price.GetData().Rows[0]["price"].ToString();
            Price.changePrice(double.Parse(textBox_price.Text));
        }
Exemple #2
0
 private void button1_Click(object sender, EventArgs e)
 {
     tryBox();
     if ((textBox_password.Text.ToString() == "123456") && (tryPrice == true))
     {
         User user = new User();
         price.changePrice(double.Parse(textBox_price.Text), 1);
         form_operator.textBox_price.Text = price.GetData().Rows[0]["price"].ToString();
         user.changePrice(double.Parse(textBox_price.Text));
         MessageBox.Show("Стоимость изменена!");
         this.Close();
     }
     else
     {
         MessageBox.Show("Неверный пароль!");
     }
 }