// 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)); }
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); }
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); }
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); }
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); }
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); }
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); }
public void deleteEquipeMember(int memberID) { string sql = "DELETE FROM " + equipeTable + " WHERE " + "memberID" + " = " + memberID; SQLiteCommandsExecuter.executeNonQuery(sql, Core.AppCore.dCore.M_dbConnection); }