• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# PrimaryKeyId类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: CanRead

        /// <summary>
        /// Determines whether this instance can read the specified report id.
        /// </summary>
        /// <param name="reportId">The report id.</param>
        /// <param name="userId">The user id.</param>
        /// <returns>
        /// 	<c>true</c> if this instance can read the specified report id; otherwise, <c>false</c>.
        /// </returns>
        public static bool CanRead(PrimaryKeyId reportId, int userId)
        {
            SqlParameter retVal = SqlHelper.CreateRetvalSqlParameter();

            SqlHelper.ExecuteNonQuery(SqlContext.Current,
                CommandType.StoredProcedure, "mc_mcweb_ReportAceCanUserRead",
                SqlHelper.SqlParameter("@UserId", SqlDbType.Int, userId),
                SqlHelper.SqlParameter("@ReportId", SqlDbType.UniqueIdentifier, reportId),
                retVal);

            return ((int)retVal.Value) == 1;
        }
开发者ID:0anion0,项目名称:IBN,代码行数:20,代码来源:ReportManager.cs


示例17: Update

        public static void Update(int documentId, string title, string description,
			int priorityId, int managerId, int taskTime, ArrayList categories,
			PrimaryKeyId ContactUid, PrimaryKeyId OrgUid)
        {
            VerifyCanUpdate(documentId);

            using(DbTransaction tran = DbTransaction.Begin())
            {
                UpdateGeneralInfo(documentId, title, description, false);
                UpdatePriority(documentId, priorityId, false);
                UpdateManager(documentId, managerId, false);
                UpdateCategories(ListAction.Set, documentId, categories, false);
                UpdateTimeLine(documentId, taskTime, false);
                UpdateClient(documentId, ContactUid, OrgUid, false);

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


示例18: AddNavigationItem

        /// <summary>
        /// Adds the navigation item.
        /// </summary>
        /// <param name="parentFullId">The parent full id.</param>
        /// <param name="order">The order.</param>
        /// <param name="text">The text.</param>
        /// <param name="url">The URL.</param>
        /// <param name="profileId">The profile id.</param>
        /// <param name="principalId">The principal id.</param>
        public static void AddNavigationItem(string parentFullId, int order, string text, string url, PrimaryKeyId? profileId, PrimaryKeyId? principalId)
        {
            using (TransactionScope transaction = DataContext.Current.BeginTransaction())
            {
                // Create item
                CustomizationItemEntity item = CreateCustomizationItemByParent(parentFullId, CustomizationStructureType.NavigationMenu, ItemCommandType.Add, profileId, principalId);

                CreateCustomizationItemArgument(item.PrimaryKeyId.Value, ItemArgumentText, text);
                CreateCustomizationItemArgument(item.PrimaryKeyId.Value, ItemArgumentOrder, order.ToString());
                CreateCustomizationItemArgument(item.PrimaryKeyId.Value, ItemArgumentCommand, Guid.NewGuid().ToString("D"));
                if (!string.IsNullOrEmpty(url))
                    CreateCustomizationItemArgument(item.PrimaryKeyId.Value, ItemArgumentUrl, url);

                transaction.Commit();
            }

            ClearCache(profileId, principalId);
        }
开发者ID:0anion0,项目名称:IBN,代码行数:27,代码来源:NavigationManager.cs


示例19: ArgumentNullException

        /// <summary>
        /// Creates the instance.
        /// </summary>
        /// <param name="metaClass">The meta class.</param>
        /// <param name="primaryKeyId">The primary key id.</param>
        /// <returns></returns>
        MetaObject IMetaObjectFactory.CreateInstance(Mediachase.Ibn.Data.Meta.Management.MetaClass metaClass, PrimaryKeyId primaryKeyId)
        {
            if (metaClass == null)
                throw new ArgumentNullException("metaClass");

            switch (metaClass.Name)
            {
                case "TimeTrackingEntry":
                    return new TimeTrackingEntry(primaryKeyId);
                case "TimeTrackingBlock":
                    return new TimeTrackingBlock(primaryKeyId);
                case "TimeTrackingBlockType":
                    return new TimeTrackingBlockType(primaryKeyId);
                case "TimeTrackingBlockTypeInstance":
                    return new TimeTrackingBlockTypeInstance(primaryKeyId);
            }

            throw new NotSupportedException("MetaClass '" + metaClass.Name + "' is not supported.");
        }
开发者ID:0anion0,项目名称:IBN,代码行数:25,代码来源:TimeTrackingObjectFactory.cs


示例20: ResumeAssignmentRequest

 /// <summary>
 /// Initializes a new instance of the <see cref="ResumeAssignmentRequest"/> class.
 /// </summary>
 /// <param name="primaryKeyId">The primary key id.</param>
 public ResumeAssignmentRequest(PrimaryKeyId primaryKeyId)
     : base(AssignmentRequestMethod.Resume, new AssignmentEntity(primaryKeyId))
 {
 }
开发者ID:0anion0,项目名称:IBN,代码行数:8,代码来源:ResumeAssignmentRequest.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Primitive类代码示例发布时间:2022-05-24
下一篇:
C# PrimUpdateFlags类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap