public int BloquearTime(Timess t)
        {
            int linhasAfetadas = 0;

            comando = new SqlCommand();
            //defineir o tipo de comando
            comando.CommandType = CommandType.StoredProcedure;
            //indicar o nome da sp
            comando.CommandText = "bloqtimes";
            comando.Parameters.AddWithValue("@bloqTimes", t.bloqtime);
            comando.Parameters.AddWithValue("@codTime", t.codigot);


            conexaoBanco       = con.abrirConexao();
            comando.Connection = conexaoBanco;
            try
            {
                linhasAfetadas = comando.ExecuteNonQuery();
            }
            catch (Exception ex)
            {
                MessageBox.Show("Vc Alterou os Dados do Time \n" + ex.Message);
            }
            finally
            {
                conexaoBanco.Close();
            }
            return(linhasAfetadas);
        }
Exemple #2
0
 public Timer(Timess tm)
 {
     _tm  = tm;
     thrd = new Thread(new ThreadStart(this.Run));
     thrd.IsBackground = true;
     thrd.Start();
 }
        public int deletarTimes(Timess t)
        {
            int linhasAfetadas = 0;

            comando = new SqlCommand();
            //defineir o tipo de comando
            comando.CommandType = CommandType.StoredProcedure;
            //indicar o nome da sp
            comando.CommandText = "deletarTime";
            comando.Parameters.AddWithValue("@nomeTime", t.nometime);



            conexaoBanco       = con.abrirConexao();
            comando.Connection = conexaoBanco;
            try
            {
                linhasAfetadas = comando.ExecuteNonQuery();
            }
            catch (Exception ex)
            {
                MessageBox.Show("Você Deletou os Dados do Time!!\n" + ex.Message);
            }
            finally
            {
                conexaoBanco.Close();
            }
            return(linhasAfetadas);
        }
Exemple #4
0
        private void FM_WorkWithArr_Load(object sender, EventArgs e) // На создание формы заполняем панель для вывода оригинального массива оригинальным массивом
        {
            #region Start timer
            tt          = Dt;
            tm          = new Timer(tt);
            label1.Text = tm.CurrentTime;
            #endregion

            CreateLBArr(AS.Main_twodim_arr, 10, 10, PN_OrigArr);
        }