Пример #1
0
        /// <summary>
        /// Creates the root.
        /// </summary>
        /// <param name="title">The title.</param>
        /// <param name="projectId">The project id.</param>
        /// <param name="ownerId">The owner id.</param>
        /// <returns></returns>
        private static CalendarFolder CreateRootNode(string title, int?projectId, int?ownerId)
        {
            if (title == null)
            {
                throw new ArgumentNullException("title");
            }

            using (TransactionScope tran = DataContext.Current.BeginTransaction())
            {
                // Step 1. Create List Folder
                CalendarFolder newRoot = new CalendarFolder();
                newRoot.Title     = title;
                newRoot.ProjectId = projectId;
                newRoot.Owner     = ownerId;
                newRoot.Save();

                // Step 2. Assign Root
                TreeNode retVal = TreeManager.AppendRootNode(Calendar.GetAssignedMetaClass(), newRoot);

                tran.Commit();

                return(newRoot);
            }
        }
Пример #2
0
 public Calendar(CustomTableRow row)
     : base(Calendar.GetAssignedMetaClass(), row)
 {
 }
Пример #3
0
 public Calendar(CustomTableRow row, MetaObjectOptions options)
     : base(Calendar.GetAssignedMetaClass(), row, options)
 {
 }
Пример #4
0
 public Calendar(int primaryKeyId)
     : base(Calendar.GetAssignedMetaClass(), primaryKeyId)
 {
 }
Пример #5
0
 public Calendar(int primaryKeyId, MetaObjectOptions options)
     : base(Calendar.GetAssignedMetaClass(), primaryKeyId, options)
 {
 }
Пример #6
0
 public Calendar()
     : base(Calendar.GetAssignedMetaClass())
 {
 }
Пример #7
0
 public Calendar(MetaObjectOptions options)
     : base(Calendar.GetAssignedMetaClass(), options)
 {
 }
Пример #8
0
 public static int GetTotalCount(params FilterElement[] filters)
 {
     return(MetaObject.GetTotalCount(Calendar.GetAssignedMetaClass(), filters));
 }
Пример #9
0
 public static Calendar[] List(Mediachase.Ibn.Data.FilterElementCollection filters, Mediachase.Ibn.Data.SortingElementCollection sorting, int start, int count)
 {
     return(MetaObject.List <Calendar>(Calendar.GetAssignedMetaClass(), filters, sorting, start, count));
 }
Пример #10
0
 public static Calendar[] List(params Mediachase.Ibn.Data.SortingElement[] sorting)
 {
     return(MetaObject.List <Calendar>(Calendar.GetAssignedMetaClass(), sorting));
 }
Пример #11
0
 public static Calendar[] List(params Mediachase.Ibn.Data.FilterElement[] filters)
 {
     return(MetaObject.List <Calendar>(Calendar.GetAssignedMetaClass(), filters));
 }
Пример #12
0
 public static Calendar[] List()
 {
     return(MetaObject.List <Calendar>(Calendar.GetAssignedMetaClass()));
 }