Esempio n. 1
0
        public bool CreateItem(int groupID, string itemName, string itemContents)
        {
            // Create a new work item in the DB and singleton
            // Once new item is created and broadcasted
            Singleton thisInstance = Singleton.Instance;

            try
            {
                // Insert item details into DB and get the returned itemID so an Item object can be created
                Item newItem = new Item(itemName, itemContents);
                DB_Update.Upsert(groupID, newItem);
                thisInstance.AddItem(groupID, newItem);
                Broadcast();
                return(true);
            }
            catch (Exception e)
            {
                throw e;
            }
        }