当前位置: 首页>>代码示例>>C#>>正文


C# PrimaryKeyId类代码示例

本文整理汇总了C#中PrimaryKeyId的典型用法代码示例。如果您正苦于以下问题:C# PrimaryKeyId类的具体用法?C# PrimaryKeyId怎么用?C# PrimaryKeyId使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


PrimaryKeyId类属于命名空间,在下文中一共展示了PrimaryKeyId类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Update

        public static void Update(
			int eventId,
			string title,
			string description,
			string location,
			int projectId,
			int managerId,
			int priorityId,
			int typeId,
			DateTime startDate, 
			DateTime finishDate,
			ArrayList categories,
			PrimaryKeyId contactUid,
			PrimaryKeyId orgUid)
        {
            VerifyCanUpdate(eventId);

            using(DbTransaction tran = DbTransaction.Begin())
            {
                UpdateGeneralInfo(eventId, typeId, title, description, location, false);
                UpdateProjectAndManager(eventId, projectId, managerId);
                UpdatePriority(eventId, priorityId, false);
                UpdateTimeline(eventId, startDate, finishDate, false);
                UpdateCategories(ListAction.Set, eventId, categories, false);
                UpdateClient(eventId, contactUid, orgUid, false);

                tran.Commit();
            }
        }
开发者ID:0anion0,项目名称:IBN,代码行数:29,代码来源:CalendarEntry2.cs

示例2: DataBind

        public override void DataBind()
        {
            if (DataItem != null)
            {
                CalendarEventEntity ceo = (CalendarEventEntity)DataItem;
                FilterElementCollection fec = new FilterElementCollection();
                FilterElement fe = FilterElement.EqualElement("EventId", ((VirtualEventId)ceo.PrimaryKeyId).RealEventId);
                fec.Add(fe);
                fe = FilterElement.EqualElement("PrincipalId", Mediachase.IBN.Business.Security.CurrentUser.UserID);
                fec.Add(fe);

                EntityObject[] list = BusinessManager.List(CalendarEventResourceEntity.ClassName, fec.ToArray());
                if (list.Length > 0)
                {
                    CalendarEventResourceEntity cero = (CalendarEventResourceEntity)list[0];
                    _resId = cero.PrimaryKeyId.Value;
                    if (cero.Status.HasValue)
                    {
                        if (cero.Status.Value == (int)eResourceStatus.Accepted)
                            btnAccept.Disabled = true;
                        if (cero.Status.Value == (int)eResourceStatus.Tentative)
                            btnTentative.Disabled = true;
                        if (cero.Status.Value == (int)eResourceStatus.Declined)
                            btnDecline.Disabled = true;
                    }
                }
            }
            base.DataBind();
        }
开发者ID:0anion0,项目名称:IBN,代码行数:29,代码来源:ResourceStatusEdit.ascx.cs

示例3: CollapseByClient

 public static void CollapseByClient(int UserId, PrimaryKeyId contactUid, PrimaryKeyId orgUid)
 {
     DbHelper2.RunSp("CollapsedToDoByClientAdd",
         DbHelper2.mp("@UserId", SqlDbType.Int, UserId),
         DbHelper2.mp("@ContactUid", SqlDbType.UniqueIdentifier, contactUid),
         DbHelper2.mp("@OrgUid", SqlDbType.UniqueIdentifier, orgUid));
 }
开发者ID:0anion0,项目名称:IBN,代码行数:7,代码来源:DBToDo.cs

示例4: AddEntityHistory

 public static void AddEntityHistory(string className, PrimaryKeyId objectId, string objectTitle, int userId, bool isView)
 {
     DbHelper2.RunSp("HistoryEntityAdd",
         DbHelper2.mp("@ClassName", SqlDbType.NVarChar, 250, className),
         DbHelper2.mp("@ObjectId", SqlDbType.VarChar, 36, objectId.ToString()),
         DbHelper2.mp("@ObjectTitle", SqlDbType.NVarChar, 250, objectTitle),
         DbHelper2.mp("@UserId", SqlDbType.Int, userId),
         DbHelper2.mp("@IsView", SqlDbType.Bit, isView));
 }
开发者ID:0anion0,项目名称:IBN,代码行数:9,代码来源:DBCommon.cs

示例5: AddMessageToOutgoingQueue

        /// <summary>
        /// Adds the message to outgoing queue.
        /// </summary>
        /// <param name="referenceFieldName">Name of the reference field.</param>
        /// <param name="primaryKeyId">The primary key id.</param>
        /// <param name="source">The source.</param>
        /// <returns></returns>
        protected PrimaryKeyId AddMessageToOutgoingQueue(string metaClassName, string referenceFieldName, PrimaryKeyId primaryKeyId, string source)
        {
            OutgoingMessageQueueEntity newElement = BusinessManager.InitializeEntity<OutgoingMessageQueueEntity>(OutgoingMessageQueueEntity.ClassName);

            newElement[referenceFieldName] = primaryKeyId;
            newElement.Source = source;

            return BusinessManager.Create(newElement);
        }
开发者ID:0anion0,项目名称:IBN,代码行数:16,代码来源:OutgoingMessageQueuePlugin.cs

示例6: CreatePrincipal

        /// <summary>
        /// Creates the principal.
        /// </summary>
        /// <param name="primaryKeyId">The primary key id.</param>
        /// <param name="name">The name.</param>
        internal static void CreatePrincipal(DirectoryPrincipalType principalType, PrimaryKeyId primaryKeyId, string name)
        {
            DirectoryPrincipalEntity principal = (DirectoryPrincipalEntity)BusinessManager.InitializeEntity(DirectoryPrincipalEntity.ClassName);

            principal["DirectoryPrincipalId"] = primaryKeyId;
            principal.Type = (int)principalType;
            principal.Name = name;

            BusinessManager.Create(principal);
        }
开发者ID:0anion0,项目名称:IBN,代码行数:15,代码来源:DirectoryManager.cs

示例7: CreateEntityObject

        /// <summary>
        /// Creates the entity object.
        /// </summary>
        /// <param name="metaClassName">Name of the meta class.</param>
        /// <param name="primaryKeyId">The primary key id.</param>
        /// <returns></returns>
        protected override EntityObject CreateEntityObject(string metaClassName, PrimaryKeyId? primaryKeyId)
        {
            if (metaClassName == AddressEntity.GetAssignedMetaClassName())
            {
                AddressEntity retVal = new AddressEntity();
                retVal.PrimaryKeyId = primaryKeyId;
                return retVal;
            }

            return base.CreateEntityObject(metaClassName, primaryKeyId);
        }
开发者ID:0anion0,项目名称:IBN,代码行数:17,代码来源:AddressRequestHandler.cs

示例8: CreateEntityObject

        /// <summary>
        /// Creates the entity object.
        /// </summary>
        /// <param name="metaClassName">Name of the meta class.</param>
        /// <param name="primaryKeyId">The primary key id.</param>
        /// <returns></returns>
        protected override EntityObject CreateEntityObject(string metaClassName, PrimaryKeyId? primaryKeyId)
        {
            if (metaClassName == AssignmentEntity.ClassName)
            {
                AssignmentEntity retVal = new AssignmentEntity();
                retVal.PrimaryKeyId = primaryKeyId;
                return retVal;
            }

            return base.CreateEntityObject(metaClassName, primaryKeyId);
        }
开发者ID:0anion0,项目名称:IBN,代码行数:17,代码来源:AssignmentRequestHandler.cs

示例9: CreateEntityObject

        /// <summary>
        /// Creates the entity object.
        /// </summary>
        /// <param name="metaClassName">Name of the meta class.</param>
        /// <param name="primaryKeyId">The primary key id.</param>
        /// <returns></returns>
        protected override EntityObject CreateEntityObject(string metaClassName, PrimaryKeyId? primaryKeyId)
        {
            if (metaClassName == CalendarEventResourceEntity.ClassName)
            {
                CalendarEventResourceEntity retVal = new CalendarEventResourceEntity();
                retVal.PrimaryKeyId = primaryKeyId;
                return retVal;
            }

            return base.CreateEntityObject(metaClassName, primaryKeyId);
        }
开发者ID:0anion0,项目名称:IBN,代码行数:17,代码来源:CalendarEventResourceRequestHandler.cs

示例10: CreateEntityObject

        /// <summary>
        /// Creates the entity object.
        /// </summary>
        /// <param name="metaClassName">Name of the meta class.</param>
        /// <param name="primaryKeyId">The primary key id.</param>
        /// <returns></returns>
        protected override EntityObject CreateEntityObject(string metaClassName, PrimaryKeyId? primaryKeyId)
        {
            if (metaClassName == WorkflowDefinitionEntity.ClassName)
            {
                WorkflowDefinitionEntity retVal = new WorkflowDefinitionEntity();
                retVal.PrimaryKeyId = primaryKeyId;
                return retVal;
            }

            return base.CreateEntityObject(metaClassName, primaryKeyId);
        }
开发者ID:0anion0,项目名称:IBN,代码行数:17,代码来源:WorkflowDefinitionRequestHandler.cs

示例11: CreateEntityObject

        /// <summary>
        /// Creates the entity object.
        /// </summary>
        /// <param name="metaClassName">Name of the meta class.</param>
        /// <param name="primaryKeyId">The primary key id.</param>
        /// <returns></returns>
        protected override EntityObject CreateEntityObject(string metaClassName, PrimaryKeyId? primaryKeyId)
        {
            if (metaClassName == DirectoryWorkGroupEntity.ClassName)
            {
                DirectoryWorkGroupEntity retVal = new DirectoryWorkGroupEntity();
                retVal.PrimaryKeyId = primaryKeyId;
                return retVal;
            }

            return base.CreateEntityObject(metaClassName, primaryKeyId);
        }
开发者ID:0anion0,项目名称:IBN,代码行数:17,代码来源:DirectoryWorkGroupRequestHandler.cs

示例12: CreateEntityObject

        /// <summary>
        /// Creates the entity object.
        /// </summary>
        /// <param name="metaClassName">Name of the meta class.</param>
        /// <param name="primaryKeyId">The primary key id.</param>
        /// <returns></returns>
        protected override EntityObject CreateEntityObject(string metaClassName, PrimaryKeyId? primaryKeyId)
        {
            if (metaClassName == CustomizationProfileUserEntity.ClassName)
            {
                CustomizationProfileUserEntity retVal = new CustomizationProfileUserEntity();
                retVal.PrimaryKeyId = primaryKeyId;
                return retVal;
            }

            return base.CreateEntityObject(metaClassName, primaryKeyId);
        }
开发者ID:0anion0,项目名称:IBN,代码行数:17,代码来源:CustomizationProfileUserRequestHandler.cs

示例13: CreateEntityObject

        /// <summary>
        /// Creates the entity object.
        /// </summary>
        /// <param name="metaClassName">Name of the meta class.</param>
        /// <param name="primaryKeyId">The primary key id.</param>
        /// <returns></returns>
        protected override EntityObject CreateEntityObject(string metaClassName, PrimaryKeyId? primaryKeyId)
        {
            if (metaClassName == OutgoingMessageQueueEntity.ClassName)
            {
                OutgoingMessageQueueEntity retVal = new OutgoingMessageQueueEntity();
                retVal.PrimaryKeyId = primaryKeyId;
                return retVal;
            }

            return base.CreateEntityObject(metaClassName, primaryKeyId);
        }
开发者ID:0anion0,项目名称:IBN,代码行数:17,代码来源:OutgoingMessageQueueRequestHandler.cs

示例14: CreateEntityObject

        /// <summary>
        /// Creates the entity object.
        /// </summary>
        /// <param name="metaClassName">Name of the meta class.</param>
        /// <param name="primaryKeyId">The primary key id.</param>
        /// <returns></returns>
        protected override EntityObject CreateEntityObject(string metaClassName, PrimaryKeyId? primaryKeyId)
        {
            if (metaClassName == IbnClientMessageEntity.ClassName)
            {
                IbnClientMessageEntity retVal = new IbnClientMessageEntity();
                retVal.PrimaryKeyId = primaryKeyId;
                return retVal;
            }

            return base.CreateEntityObject(metaClassName, primaryKeyId);
        }
开发者ID:0anion0,项目名称:IBN,代码行数:17,代码来源:IbnClientMessageRequestHandler.cs

示例15: CreateEntityObject

        /// <summary>
        /// Creates the entity object.
        /// </summary>
        /// <param name="metaClassName">Name of the meta class.</param>
        /// <param name="primaryKeyId">The primary key id.</param>
        /// <returns></returns>
        protected override EntityObject CreateEntityObject(string metaClassName, PrimaryKeyId? primaryKeyId)
        {
            if (metaClassName == DocumentContentVersionEntity.GetAssignedMetaClassName())
            {
                DocumentContentVersionEntity retVal = new DocumentContentVersionEntity();
                retVal.PrimaryKeyId = primaryKeyId;
                return retVal;
            }

            return base.CreateEntityObject(metaClassName, primaryKeyId);
        }
开发者ID:0anion0,项目名称:IBN,代码行数:17,代码来源:DocumentContentVersionRequestHandler.cs


注:本文中的PrimaryKeyId类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。