本文整理汇总了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();
}
}
示例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();
}
示例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));
}
示例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));
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}