Esempio n. 1
0
        private void InitializedColumnsTasks(string email, string boardName, string columnName, DALBoards dalBoards)
        {
            SQLiteCommand c = new SQLiteCommand(null, connection);

            c.CommandText = "SELECT creationTime,dueDate,title,description FROM " + TASKSTABLE + " WHERE email= @email AND boardName= @boardName AND columnName= @columnName";
            SQLiteParameter email_param      = new SQLiteParameter(@"email", email);
            SQLiteParameter boardName_param  = new SQLiteParameter(@"boardName", boardName);
            SQLiteParameter columnName_param = new SQLiteParameter(@"columnName", columnName);

            c.Parameters.Add(email_param);
            c.Parameters.Add(boardName_param);
            c.Parameters.Add(columnName_param);
            SQLiteDataReader reader = c.ExecuteReader();

            while (reader.Read())
            {
                DALTask dalTask = new DALTask(reader["creationTime"].ToString(), reader["dueDate"].ToString(), reader["title"].ToString(), reader["description"].ToString());
                dalBoards.GetBoards()[boardName].GetColumnByName(columnName).Add(dalTask);
            }
        }
Esempio n. 2
0
        private void InitializedBoardsColumns(string email, string boardName, DALBoards dalBoards)
        {
            SQLiteCommand c = new SQLiteCommand(null, connection);

            c.CommandText = "SELECT columnName FROM " + COLUMNSTABLE + " WHERE email= @email AND boardName= @boardName";
            SQLiteParameter email_param     = new SQLiteParameter(@"email", email);
            SQLiteParameter boardName_param = new SQLiteParameter(@"boardName", boardName);

            c.Parameters.Add(email_param);
            c.Parameters.Add(boardName_param);
            SQLiteDataReader reader = c.ExecuteReader();
            string           columnName;

            while (reader.Read())
            {
                columnName = reader["columnName"].ToString();
                dalBoards.GetBoards()[boardName].AddColumn(columnName);
                InitializedColumnsTasks(email, boardName, columnName, dalBoards);
            }
        }