예제 #1
0
    protected void DeleteGroupTodoList()
    {
        Ektron.Cms.Framework.ToDo.TodoList todoListApi = new Ektron.Cms.Framework.ToDo.TodoList();
        TodoListData todoListData = GetGroupTodoList();

        if (todoListData != null)
        {
            todoListApi.Delete(todoListData.Id);
        }
    }
예제 #2
0
    protected TodoListData GetGroupTodoList()
    {
        Ektron.Cms.Framework.ToDo.TodoList todoListApi = new Ektron.Cms.Framework.ToDo.TodoList();
        TodoListCriteria criteria = new TodoListCriteria();

        criteria.AddFilter(TodoListProperty.ObjectType, CriteriaFilterOperator.EqualTo, EkEnumeration.CMSObjectTypes.CommunityGroup);
        criteria.AddFilter(TodoListProperty.ObjectId, CriteriaFilterOperator.EqualTo, this.m_iID);

        List<TodoListData> list = todoListApi.GetList(criteria);

        if (list.Count > 0)
        {
            return list[0];
        }
        else
        {
            return null;
        }
    }
예제 #3
0
    protected void AddGroupTodoList()
    {
        Ektron.Cms.Framework.ToDo.TodoList todoListApi = new Ektron.Cms.Framework.ToDo.TodoList();
        TodoListData todoListData = GetGroupTodoList();

        //if todo list doesnt exist, add it
        if (todoListData == null)
        {
            todoListData = new Ektron.Cms.ToDo.TodoListData() { Name = this.GroupName_TB.Text, ObjectType = Ektron.Cms.Common.EkEnumeration.CMSObjectTypes.CommunityGroup, ObjectId = this.m_iID };

            todoListApi.Add(todoListData);
        }
    }