Exemplo n.º 1
0
        public void addMember(EquipeMember eMember)
        {
            Request.RequestBuilder rb = new Request.RequestBuilder(equipeTable);
            rb.addElement(eMember.name.valueName, eMember.name.value);

            SQLiteCommand cmd = Request.CommandBuilder.getCommand(rb, Core.AppCore.dCore.M_dbConnection);

            cmd.ExecuteNonQuery();
        }
Exemplo n.º 2
0
        /// <summary>
        /// Add the calendar object to the table and create it associated projecttablename if needed
        /// </summary>
        /// <param name="cObj"></param>
        public void AddCalendarObject(calendarObject cObj, bool createAssociatedTable = false)
        {
            try
            {
                if (cObj.tableName == null)
                {
                    throw new ArgumentNullException();
                }

                // associate project table name :
                // ============

                if (cObj.isRepository.value)
                {
                    if ((cObj.isRepository.value && createAssociatedTable) || (cObj.projectTableName.value == null || cObj.projectTableName.value == ""))
                    {
                        cObj.projectTableName.value = "Element_" + Guid.NewGuid().ToString("n") + "_Tasks";
                    }
                    // else just use the current table name
                    CreateCalendarTable(cObj.projectTableName.value);
                }

                Request.RequestBuilder rb = new Request.RequestBuilder(cObj.tableName);
                foreach (sqliteBase sb in cObj.values)
                {
                    rb.addElement(sb.valueName, sb.baseValue);
                }

                SQLiteCommand cmd = Request.CommandBuilder.getCommand(rb, Core.AppCore.dCore.M_dbConnection);
                cmd.ExecuteNonQuery();
            }
            catch (Exception ex)
            {
                ex.Source = "SQL_lite_database_search_wpf.Core.DatabaseManager.ObjectsManager.CalendarObjectManager.addCalendarObject";
                Usefull_Tools.ErrorHandeler.printOut(ex);
            }
        }