Exemplo n.º 1
0
        private void button19_Click(object sender, EventArgs e)
        {
            OracleConnection ora = new OracleConnection("DATA SOURCE = EC11; PASSWORD = qwerty; USER ID = Dmitriy;");

            ora.Open();
            try
            {
                OracleCommand com = new OracleCommand("updateJornalInT", ora);
                com.CommandType = System.Data.CommandType.StoredProcedure;
                com.Parameters.Add("time_out_v", OracleType.Timestamp).Value = time_out;
                com.Parameters.Add("time_in_v", OracleType.Timestamp).Value  = time_in;
                com.Parameters.Add("autoNum", OracleType.Char, 7).Value      = auto_id;
                com.Parameters.Add("routeName", OracleType.Char, 50).Value   = route_id;
                string dateOut = (dateTimePicker7InUp.Value.Date + dateTimePicker8InUp.Value.TimeOfDay).ToString("yyyy-MM-dd HH:mm:ss");
                com.Parameters.Add("T_IN", OracleType.Char, 20).Value = dateOut;
                com.ExecuteNonQuery();
                updateForm u = new updateForm();
                u.Show();
            }
            catch (Exception ex)
            {
                ErrorTime er = new ErrorTime();
                er.Show();
            }
            ora.Close();
        }
Exemplo n.º 2
0
        private void button21_Click(object sender, EventArgs e)
        {
            OracleConnection ora = new OracleConnection("DATA SOURCE = EC11; PASSWORD = qwerty; USER ID = Dmitriy;");

            ora.Open();
            OracleCommand com = new OracleCommand("updateNameRouteJornal", ora);

            com.CommandType = System.Data.CommandType.StoredProcedure;
            com.Parameters.Add("time_out_v", OracleType.Timestamp).Value = time_out;
            com.Parameters.Add("time_in_v", OracleType.Timestamp).Value  = time_in;
            com.Parameters.Add("autoNum", OracleType.Char, 7).Value      = auto_id;
            com.Parameters.Add("routeName", OracleType.Char, 50).Value   = route_id;
            com.Parameters.Add("NameR", OracleType.Char, 60).Value       = comboBoxNameR.Text;
            com.ExecuteNonQuery();
            updateForm u = new updateForm();

            u.Show();
            ora.Close();
        }
Exemplo n.º 3
0
 private void UpPer_Click(object sender, EventArgs e)
 {
     if (UpNumEX.Text == "" || textLastName.Text == "")
     {
         ErrorInputLable er = new ErrorInputLable();
         er.Show();
     }
     else
     {
         OracleConnection ora = new OracleConnection("DATA SOURCE = EC11; PASSWORD = qwerty; USER ID = Dmitriy;");
         ora.Open();
         OracleCommand com = new OracleCommand("updateLastNameAuto", ora);
         com.CommandType = System.Data.CommandType.StoredProcedure;
         com.Parameters.Add("numAuto", OracleType.Char, 20).Value  = UpNumEX.Text;
         com.Parameters.Add("lastName", OracleType.Char, 20).Value = textLastName.Text;
         com.ExecuteNonQuery();
         updateForm u = new updateForm();
         u.Show();
         ora.Close();
     }
 }