Example #1
0
        private void button52_Click(object sender, EventArgs e)
        {
            BOXForm dbs = new BOXForm();

            dbs.Show();
            this.Hide();
        }
Example #2
0
        private void opop2()
        {
            string connectionString = @"" + Settings.Default.packingConnectionString + "";

            using (MySqlConnection conn = new MySqlConnection(connectionString))
            {
                conn.Open();
                string time = DateTime.Now.ToString("dd");

                int GG = Convert.ToInt32(yan3);
                GG++;
                using (
                    MySqlCommand cmd =
                        new MySqlCommand("UPDATE packing.dones_smena SET smena2 = " + GG + " WHERE project ='" +
                                         Properties.Settings.Default.project + "'" + " AND id='" + odi +
                                         "' AND referencia='" + Properties.Settings.Default.referencia +
                                         "' AND dates='" + DateTime.Now.ToString("dd.MM.yyyy") + "';", conn))
                {
                    cmd.ExecuteNonQuery();
                    reader = cmd.ExecuteReader();
                    BOXForm dbs = new BOXForm();
                    dbs.Show();
                    this.Hide();
                    int i = 0;
                    //try
                    //{
                    while (reader.Read())
                    {
                        odi = reader[0].ToString();
                    }

                    //}
                    //catch (Exception)
                    //{
                    //}
                }
            }
        }