本文整理汇总了C#中PrimaryKeyId.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# PrimaryKeyId.ToString方法的具体用法?C# PrimaryKeyId.ToString怎么用?C# PrimaryKeyId.ToString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PrimaryKeyId
的用法示例。
在下文中一共展示了PrimaryKeyId.ToString方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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));
}
示例2: GetTitleClient
protected string GetTitleClient(bool IsClient, bool IsCollapsed, PrimaryKeyId contactUid, PrimaryKeyId orgUid,
string ClientName, int IncId, string IncTitle, int StatusId, string StatusName, bool isOverdue)
{
if (IsClient)
{
string _client = "";
string _key = "";
if (contactUid != PrimaryKeyId.Empty)
{
_client = CommonHelper.GetContactLink(this.Page, contactUid, ClientName);
_key = "contact_" + contactUid.ToString();
}
else if (orgUid != PrimaryKeyId.Empty)
{
_client = CommonHelper.GetOrganizationLink(this.Page, orgUid, ClientName);
_key = "org_" + orgUid.ToString();
}
else
{
_client = "<span style='width:4px'> </span><font color='#003399'>" + LocRM.GetString("tNoClient") + "</font>";
_key = "noclient";
}
_hash.Add(_key, "CollapseExpand2(" + (IsCollapsed ? "1" : "0") + ",'" + contactUid.ToString() + "','" + orgUid.ToString() + "', event)");
return "<b>" + " " + GetIcon(!IsCollapsed) + " " + _client + "</b>";
}
else
return "<span style='width:24px'> </span>" + Util.CommonHelper.GetIncidentTitle(IncTitle, IncId, isOverdue, StatusId, StatusName);
}
示例3: DeleteEntityHistory
public static void DeleteEntityHistory(string className, PrimaryKeyId objectId)
{
DbHelper2.RunSp("HistoryEntityDelete",
DbHelper2.mp("@ClassName", SqlDbType.NVarChar, 250, className),
DbHelper2.mp("@ObjectId", SqlDbType.VarChar, 36, objectId.ToString()));
}
示例4: GetContactLink
public static string GetContactLink(Page pageInstance, PrimaryKeyId ContactUid, string ClientName)
{
bool canEdit = true;
if (Security.IsUserInGroup(InternalSecureGroups.Partner))
{
int groupId = User.GetGroupForPartnerUser(Security.CurrentUser.UserID);
using (IDataReader reader = SecureGroup.GetGroup(groupId))
{
if (reader.Read())
{
if (reader["OrgUid"] != DBNull.Value)
{
PrimaryKeyId partnerOrgUid = PrimaryKeyId.Parse(reader["OrgUid"].ToString());
ContactEntity contactEntity = (ContactEntity)BusinessManager.Load(ContactEntity.GetAssignedMetaClassName(), ContactUid);
if (!contactEntity.OrganizationId.HasValue || contactEntity.OrganizationId.Value != partnerOrgUid)
canEdit = false;
}
else if (reader["ContactUid"] == DBNull.Value || PrimaryKeyId.Parse(reader["ContactUid"].ToString()) != ContactUid)
canEdit = false;
}
}
}
if (canEdit && !Security.CurrentUser.IsExternal)
return String.Format(CultureInfo.InvariantCulture,
"<a href='{0}'>{1}</a>",
pageInstance.ResolveClientUrl(CHelper.GetLinkEntityView(ContactEntity.GetAssignedMetaClassName(), ContactUid.ToString())),
ClientName);
else
return ClientName;
}
示例5: GetClientLink
public static string GetClientLink(Page pageInstance, PrimaryKeyId OrgUid, PrimaryKeyId ContactUid, string ClientName)
{
bool canOrgEdit = true;
bool canClientEdit = true;
ContactEntity contactEntity = null;
if (ContactUid != PrimaryKeyId.Empty)
{
try
{
contactEntity = (ContactEntity)BusinessManager.Load(ContactEntity.GetAssignedMetaClassName(), ContactUid);
}
catch
{
return String.Empty;
}
}
if (Security.IsUserInGroup(InternalSecureGroups.Partner))
{
canOrgEdit = false;
canClientEdit = false;
int groupId = User.GetGroupForPartnerUser(Security.CurrentUser.UserID);
PrimaryKeyId partnerOrgUid = PrimaryKeyId.Empty;
PrimaryKeyId partnerContactUid = PrimaryKeyId.Empty;
using (IDataReader reader = SecureGroup.GetGroup(groupId))
{
if (reader.Read())
{
if (reader["OrgUid"] != DBNull.Value)
partnerOrgUid = PrimaryKeyId.Parse(reader["OrgUid"].ToString());
if (reader["ContactUid"] != DBNull.Value)
partnerContactUid = PrimaryKeyId.Parse(reader["ContactUid"].ToString());
}
}
if (OrgUid != PrimaryKeyId.Empty)
{
if (partnerOrgUid == OrgUid)
canOrgEdit = true;
}
else if (ContactUid != PrimaryKeyId.Empty)
{
if (partnerOrgUid != PrimaryKeyId.Empty
&& contactEntity.OrganizationId.HasValue
&& partnerOrgUid == contactEntity.OrganizationId.Value)
{
canOrgEdit = true;
canClientEdit = true;
}
if (partnerContactUid != PrimaryKeyId.Empty && partnerContactUid == ContactUid)
{
canOrgEdit = false;
canClientEdit = true;
}
}
}
string retval = "";
if (OrgUid != PrimaryKeyId.Empty)
{
if (canOrgEdit && !Security.CurrentUser.IsExternal)
retval = String.Format(CultureInfo.InvariantCulture,
"<a href='{0}'>{1}</a>",
pageInstance.ResolveClientUrl(CHelper.GetLinkEntityView(OrganizationEntity.GetAssignedMetaClassName(), OrgUid.ToString())),
ClientName);
else
retval = ClientName;
}
else if (ContactUid != PrimaryKeyId.Empty)
{
if (!String.IsNullOrEmpty(contactEntity.Organization))
{
if (!Security.CurrentUser.IsExternal)
{
if (canOrgEdit && canClientEdit)
retval = String.Format(CultureInfo.InvariantCulture,
"<a href='{0}'>{1}</a> ( <a href='{2}'>{3}</a> )",
pageInstance.ResolveClientUrl(CHelper.GetLinkEntityView(ContactEntity.GetAssignedMetaClassName(), ContactUid.ToString())),
ClientName,
pageInstance.ResolveClientUrl(CHelper.GetLinkEntityView(OrganizationEntity.GetAssignedMetaClassName(), contactEntity.OrganizationId.ToString())),
contactEntity.Organization);
else if (canOrgEdit && !canClientEdit)
retval = String.Format(CultureInfo.InvariantCulture,
"{0} ( <a href='{1}'>{2}</a> )",
ClientName,
pageInstance.ResolveClientUrl(CHelper.GetLinkEntityView(OrganizationEntity.GetAssignedMetaClassName(), contactEntity.OrganizationId.ToString())),
contactEntity.Organization);
else if (!canOrgEdit && canClientEdit)
retval = String.Format(CultureInfo.InvariantCulture,
"<a href='{0}'>{1}</a> ( {2} )",
pageInstance.ResolveClientUrl(CHelper.GetLinkEntityView(ContactEntity.GetAssignedMetaClassName(), ContactUid.ToString())),
ClientName,
contactEntity.Organization);
else
retval = String.Format(CultureInfo.InvariantCulture,
"{0} ( {1} )",
ClientName,
contactEntity.Organization);
}
//.........这里部分代码省略.........
示例6: GetOrganizationLink
public static string GetOrganizationLink(Page pageInstance, PrimaryKeyId OrgUid, string OrgName)
{
bool canEdit = true;
if (Security.IsUserInGroup(InternalSecureGroups.Partner))
{
int groupId = User.GetGroupForPartnerUser(Security.CurrentUser.UserID);
using (IDataReader reader = SecureGroup.GetGroup(groupId))
{
if (reader.Read())
{
if (reader["OrgUid"] == DBNull.Value || PrimaryKeyId.Parse(reader["OrgUid"].ToString()) != OrgUid)
canEdit = false;
}
}
}
if (canEdit && !Security.CurrentUser.IsExternal)
return String.Format(CultureInfo.InvariantCulture,
"<a href='{0}'>{1}</a>",
pageInstance.ResolveClientUrl(CHelper.GetLinkEntityView(OrganizationEntity.GetAssignedMetaClassName(), OrgUid.ToString())),
OrgName);
else
return OrgName;
}
示例7: GetTitleClient
protected string GetTitleClient(bool isClient, bool isCollapsed,
PrimaryKeyId contactUid, PrimaryKeyId orgUid,
string clientName, int docId, string title)
{
if (isClient)
{
string client = "";
string key = "";
if (contactUid != PrimaryKeyId.Empty)
{
client = CommonHelper.GetContactLink(this.Page, contactUid, clientName);
key = "contact_" + contactUid.ToString();
}
else if (orgUid != PrimaryKeyId.Empty)
{
client = CommonHelper.GetOrganizationLink(this.Page, orgUid, clientName);
key = "org_" + orgUid.ToString();
}
else
{
client = "<span style='width:4px'> </span><font color='#003399'>" + LocRM.GetString("tNoClient") + "</font>";
key = "noclient";
}
_hash.Add(key, "CollapseExpand2(" + (isCollapsed ? "1" : "0") + ",'" + contactUid.ToString() + "','" + orgUid.ToString() + "', event)");
return "<b>" + " " + GetIcon(!isCollapsed) + " " + client + "</b>";
}
else
return String.Format("<span class='text' style='padding-left:25px'><a href='DocumentView.aspx?DocumentId={0}'>{1}</a></span>", docId, title);
}
示例8: GetTitle
protected string GetTitle(bool isClient, int prjId, PrimaryKeyId contactUid, PrimaryKeyId orgUid,
string clientName, bool isCollapsed)
{
if (isClient)
{
string client = "";
string key = "";
if (contactUid != PrimaryKeyId.Empty)
{
client = CommonHelper.GetContactLink(this.Page, contactUid, clientName);
key = "contact_" + contactUid.ToString();
}
else if (orgUid != PrimaryKeyId.Empty)
{
client = CommonHelper.GetOrganizationLink(this.Page, orgUid, clientName);
key = "org_" + orgUid.ToString();
}
else
{
client = "<span style='width:4px'> </span><font color='#003399'>" + LocRM.GetString("tNoClient") + "</font>";
key = "noclient";
}
_hash.Add(key, "CollapseExpand(" + (isCollapsed ? "1" : "0") + ",'" + contactUid.ToString() + "','" + orgUid.ToString() + "', event)");
return "<table class='alt-tblstyle' style='width:100%'><tr><td class='text'>" +
"<b>" + " " + GetIcon(!isCollapsed) + " " + client + "</b>" +
"</td></tr></table>";
}
else
{
return "<span class='text' style='padding-left:15px'>" + CommonHelper.GetProjectStatusWithId(prjId) + "</span>";
}
}