//------------------------------------------------------------------------------------ /// <summary> /// Performs a close operation for the given store item. /// </summary> //------------------------------------------------------------------------------------ public void CloseStoreItemWorker(StoreItem item) { try { Planner.Instance.WriteToEventLog("Closing item - " + item.ID.ToString() + ": " + item.Title); OpenForClose(item.DSItem); WriteItemToDS(item); if (item.StoreItemType == ItemTypeID.PlannerBug) { PlannerBugItem bugItem = (PlannerBugItem)item; bugItem.DSItem.Fields[PropNameBugComments].Value = bugItem.BugComments; } item.DSItem.Save(); ResetItem(item); item.LastSavedTime = DateTime.Now; Planner.Instance.WriteToEventLog("Close complete:" + item.ID.ToString()); } catch (Exception exception) { Planner.Instance.WriteToEventLog("CloseStoreItemWorker exception: " + exception.Message); throw exception; } }
public static PlannerBugItem CreateItem() { PlannerBugItem newItem = ScheduleStore.Instance.CreateStoreItem <PlannerBugItem>(ItemTypeID.PlannerBug); newItem.Title = ""; return(newItem); }