Example #1
0
        private void CreateBoard_btn_Click(object sender, RoutedEventArgs e)
        {
            boardPanel.Children.Clear();
            CreateBoard board1 = new CreateBoard();

            board1.ShowDialog();
        }
Example #2
0
        private void CreatePin_btn_Click(object sender, RoutedEventArgs e)
        {
            con.Open();
            OracleCommand command = new OracleCommand();

            command.Connection  = con;
            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();
            con.Close();

            boardPanel.Children.Clear();
            if (i == 0)
            {
                MessageBox.Show("Please, create board First");
                CreateBoard board1 = new CreateBoard();
                board1.ShowDialog();
            }
            else
            {
                CreatePin pin1 = new CreatePin();
                pin1.ShowDialog();
            }
        }