Exemple #1
0
        public void DeleteData()
        {
            //Database tables deletion---------------------------------------------------------------------------------
            dataUserController   DUC = new dataUserController();
            dataBoardController  DBC = new dataBoardController();
            dataColumnController DCC = new dataColumnController();
            dataTaskController   DTC = new dataTaskController();

            DUC.DeleteAll(); //Deleting all Users from database
            log.Info("deleted all users");
            DBC.DeleteAll(); //Deleting all Boards from database
            log.Info("deleted all boards");
            DCC.DeleteAll(); //Deleting all Columns from database
            log.Info("deleted all columns");
            DTC.DeleteAll(); //Deleting all Tasks from database
            log.Info("deleted all tasks");
            //Variables data deletion----------------------------------------------------------------------------------
            foreach (var item in users) //Calling each board to deleteData (which deletes all columns and tasks)
            {
                item.Value.getBoard().DeleteData();
            }

            this.users = new Dictionary <string, User>(); //Deleting all existing users by creating new empty dictionary
            bc.DeleteData();
        }
Exemple #2
0
        public void setKey(int key)
        {
            dataColumnController DCC = new dataColumnController();

            DCC.Update(boardId, this.key, "columnOrdinal", key);
            this.key = key;//must be after writing to data base
        }
Exemple #3
0
        public void changeName(string newName)
        {
            if (!validColumnName(newName))
            {
                log.Warn("invalid name");
                throw new Exception("invalid name");
            }
            this.name = newName;
            dataColumnController DCC = new dataColumnController();

            DCC.Update(boardId, key, "name", newName);
        }
Exemple #4
0
        }                  //empty constructor

        public Column(string name, int columnOrdinal, int boardId)
        {
            if (!validColumnName(name))
            {
                log.Warn("invalid name");
                throw new Exception("invalid name");
            }
            this.name    = name;
            tasks        = new List <Task>(); //New empty list without tasks
            this.key     = columnOrdinal;
            this.limit   = 100;
            this.name    = name;
            this.boardId = boardId;

            //inserting to database
            dataColumnController DCC = new dataColumnController();

            DCC.Insert(this.toDalObject());
        }