Ejemplo n.º 1
0
        // equipe manager
        public List <EquipeMember> getEquipeMembers()
        {
            string           sql    = "select * from " + equipeTable + " order by _rowid_ ASC";
            SQLiteDataReader reader = SQLiteCommandsExecuter.executeDataReader(sql, Core.AppCore.dCore.M_dbConnection);

            return(getEquipeFromReader(reader));
        }
Ejemplo n.º 2
0
        public void createEquipeTable()
        {
            EquipeMember eMember = new EquipeMember();

            StringBuilder sbElements = new StringBuilder();
            {
                bool justCreated = true;

                foreach (sqliteBase sElement in eMember.values)
                {
                    if (justCreated)
                    {
                        justCreated = false;
                    }
                    else
                    {
                        sbElements.Append(", ");
                    }
                    sbElements.Append(sElement.valueName + " " + sElement.dataType);
                }
            }

            string sql_command = "CREATE TABLE " + equipeTable + " ( " + sbElements.ToString() + ")";

            SQLiteCommandsExecuter.executeNonQuery(sql_command, Core.AppCore.dCore.M_dbConnection);
        }
Ejemplo n.º 3
0
        public List <calendarObject> ListAllCalendarObjectsBySelection(string tableName, SelectionType selType, List <calendarObject> cObjs = null)
        {
            if (cObjs == null)
            {
                cObjs = new List <calendarObject>();
            }

            string           sql    = "select * from " + tableName + " order by " + elementID + " ASC";
            SQLiteDataReader reader = SQLiteCommandsExecuter.executeDataReader(sql, Core.AppCore.dCore.M_dbConnection);

            foreach (calendarObject cObj in ReaderToCobjs(reader, tableName))
            {
                if (cObj.isDateUsed.value && selType == SelectionType.isDateUsed)
                {
                    cObjs.Add(cObj);
                }
                if (cObj.isRepository.value && selType == SelectionType.isRepository)
                {
                    cObjs.Add(cObj);
                }

                if (cObj.isRepository.value && selType == SelectionType.isDateUsed)
                {
                    cObjs = ListAllCalendarObjectsBySelection(cObj.projectTableName.value, selType, cObjs);
                }
                else if (cObj.isRepository.value && selType == SelectionType.isRepository)
                {
                    cObjs = ListAllCalendarObjectsBySelection(cObj.projectTableName.value, selType, cObjs);
                }
            }

            return(cObjs);
        }
Ejemplo n.º 4
0
        public void CreateCalendarTable(string tableName)
        {
            calendarObject cObj = new calendarObject();

            StringBuilder sbElements = new StringBuilder();
            {
                bool justCreated = true;

                foreach (sqliteBase sElement in cObj.values)
                {
                    if (justCreated)
                    {
                        justCreated = false;
                    }
                    else
                    {
                        sbElements.Append(", ");
                    }
                    sbElements.Append(sElement.valueName + " " + sElement.dataType);
                }
            }

            string sql_command = "CREATE TABLE " + tableName + " ( " + sbElements.ToString() + ")";

            SQLiteCommandsExecuter.executeNonQuery(sql_command, Core.AppCore.dCore.M_dbConnection);
        }
Ejemplo n.º 5
0
        public List <Project> loadProject()
        {
            string           sql      = "select * from " + TableProject + " order by _rowid_ ASC";
            SQLiteDataReader reader   = SQLiteCommandsExecuter.executeDataReader(sql);
            List <Project>   projects = ObjectManager.readerToProjects(reader);

            return(projects);
        }
Ejemplo n.º 6
0
        public List <calendarObject> ListCalendarObjects(string tableName)
        {
            string                sql      = "select * from " + tableName + " order by _rowid_ ASC";
            SQLiteDataReader      reader   = SQLiteCommandsExecuter.executeDataReader(sql, Core.AppCore.dCore.M_dbConnection);
            List <calendarObject> cObjects = ReaderToCobjs(reader, tableName);

            return(cObjects);
        }
Ejemplo n.º 7
0
        public calendarObject GetCalendarObject(int objectID, string tableName)
        {
            string           sql      = "select * from " + tableName + " where (" + elementID + "=" + objectID + ")  order by _rowid_ ASC LIMIT 1";
            SQLiteDataReader reader   = SQLiteCommandsExecuter.executeDataReader(sql, Core.AppCore.dCore.M_dbConnection);
            calendarObject   cObjects = ReaderToCobj(reader, tableName);

            return(cObjects);
        }
Ejemplo n.º 8
0
        public void deleteEquipeMember(int memberID)
        {
            string sql = "DELETE FROM " + equipeTable + " WHERE " + "memberID" + " = " + memberID;

            SQLiteCommandsExecuter.executeNonQuery(sql, Core.AppCore.dCore.M_dbConnection);
        }