示例#1
0
        /// <summary>
        /// Read a compound id list given a user object
        /// </summary>
        /// <param name="uo"></param>
        /// <returns></returns>

        public static CidList Read(
            UserObject uo)
        {
            string name = uo.InternalName;

            return(CidListDao.Read(name, null));
        }
示例#2
0
        /// <summary>
        /// Read a compound id list given a user object
        /// </summary>
        /// <param name="uo"></param>
        /// <returns></returns>

        public static CidList Read(
            UserObject uo,
            MetaTable mt)
        {
            string name = uo.InternalName;

            return(CidListDao.Read(name, mt));
        }
示例#3
0
/// <summary>
/// Copy a list to another list
/// </summary>
/// <param name="sourceListUOInternalName"></param>
/// <param name="destList"></param>
/// <returns></returns>

        public static int CopyList(
            string sourceListUOInternalName,
            UserObject destList)
        {
            CidList list = CidListDao.Read(sourceListUOInternalName);

            CidListDao.Write(list, destList);
            return(list.Count);
        }
示例#4
0
/// <summary>
/// Copy a list to another list
/// </summary>
/// <param name="sourceList"></param>
/// <param name="destList"></param>
/// <returns></returns>

        public static int CopyList(
            UserObject sourceList,
            UserObject destList)
        {
            CidList list = CidListDao.Read(sourceList);

            CidListDao.Write(list, destList);
            return(list.Count);
        }
示例#5
0
        /// <summary>
        /// Execute list logic on a pair of persisted list objects & store results in current list for user
        /// </summary>
        /// <param name="list1InternalName"></param>
        /// <param name="list2InternalName"></param>
        /// <param name="op"></param>
        /// <returns>Number of results from logic operation</returns>

        public static int ExecuteListLogic(
            string list1InternalName,
            string list2InternalName,
            ListLogicType op)
        {
            CidList list1 = Read(list1InternalName);

            if (list1 == null)
            {
                throw new Exception("List not found: " + list1InternalName);
            }

            CidList list2 = Read(list2InternalName);

            if (list2 == null)
            {
                throw new Exception("List not found: " + list2InternalName);
            }

            list1.ApplyListLogic(list2, op);

            CidListDao.Write(list1, "Current");             // write new current list
            return(list1.Count);
        }
示例#6
0
        /// <summary>
        /// Read a compound id list given an internal list name (e.g. FOLDER_123.name or LIST_1234)
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>

        public static CidList Read(
            string internalName)
        {
            return(CidListDao.Read(internalName, null));
        }