Exemple #1
0
        private void addPinToBoard_btn_Click(object sender, RoutedEventArgs e)
        {
            connection.Open();
            OracleCommand command = new OracleCommand();

            command.Connection  = connection;
            command.CommandText = "select count(*)  from board where user_id= :userid";
            command.CommandType = CommandType.Text;
            command.Parameters.Add("userid", Account.UserID);
            OracleDataReader reader = command.ExecuteReader();
            int i = -1;

            if (reader.Read())
            {
                i = Convert.ToInt32(reader[0]);
            }
            reader.Close();
            connection.Close();

            if (i == 0)
            {
                MessageBox.Show("Please, create board First");
            }
            else
            {
                choose_board choose_form = new choose_board();
                choose_form.add_to_board = true;
                choose_form.pin_id       = pin_id;
                choose_form.ShowDialog();
            }
        }
Exemple #2
0
        private void moveMyPin_btn_Click(object sender, RoutedEventArgs e)
        {
            choose_board choose_form = new choose_board();

            choose_form.pin_id = pin_id;
            choose_form.ShowDialog();
        }