本文整理汇总了C#中IIdentity.GetStatusFieldPermissionLevel方法的典型用法代码示例。如果您正苦于以下问题:C# IIdentity.GetStatusFieldPermissionLevel方法的具体用法?C# IIdentity.GetStatusFieldPermissionLevel怎么用?C# IIdentity.GetStatusFieldPermissionLevel使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IIdentity
的用法示例。
在下文中一共展示了IIdentity.GetStatusFieldPermissionLevel方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: print_bug
//.........这里部分代码省略.........
+ HttpUtility.HtmlEncode((string)dr["short_desc"])
+ "</a></b><p>");
// start of the table with the bug fields
Response.Write ("\n<table border=1 cellpadding=3 cellspacing=0>");
Response.Write("\n<tr><td>Last changed by<td>"
+ format_username((string)dr["last_updated_user"],(string)dr["last_updated_fullname"])
+ " ");
Response.Write("\n<tr><td>Reported By<td>"
+ format_username((string)dr["reporter"],(string)dr["reporter_fullname"])
+ " ");
Response.Write("\n<tr><td>Reported On<td>" + btnet.Util.format_db_date_and_time(dr["reported_date"]) + " ");
if (identity.GetTagsFieldPermissionLevel() > 0)
Response.Write("\n<tr><td>Tags<td>" + dr["bg_tags"] + " ");
if (identity.GetProjectFieldPermissionLevel() > 0)
Response.Write("\n<tr><td>Project<td>" + dr["current_project"] + " ");
if (identity.GetOrgFieldPermissionLevel() > 0)
Response.Write("\n<tr><td>Organization<td>" + dr["og_name"] + " ");
if (identity.GetCategoryFieldPermissionLevel()> 0)
Response.Write("\n<tr><td>Category<td>" + dr["category_name"] + " ");
if (identity.GetPriorityFieldPermissionLevel() > 0)
Response.Write("\n<tr><td>Priority<td>" + dr["priority_name"] + " ");
if (identity.GetAssignedToFieldPermissionLevel() > 0)
Response.Write("\n<tr><td>Assigned<td>"
+ format_username((string)dr["assigned_to_username"],(string)dr["assigned_to_fullname"])
+ " ");
if (identity.GetStatusFieldPermissionLevel() > 0)
Response.Write("\n<tr><td>Status<td>" + dr["status_name"] + " ");
if (identity.GetUdfFieldPermissionLevel() > 0)
if (btnet.Util.get_setting("ShowUserDefinedBugAttribute","1") == "1")
{
Response.Write("\n<tr><td>"
+ btnet.Util.get_setting("UserDefinedBugAttributeName","YOUR ATTRIBUTE")
+ "<td>"
+ dr["udf_name"] + " ");
}
// Get custom column info (There's an inefficiency here - we just did this
// same call in get_bug_datarow...)
// create project custom dropdowns
if ((int)dr["project"] != 0)
{
var sql = new SQLString(@"select
isnull(pj_enable_custom_dropdown1,0) [pj_enable_custom_dropdown1],
isnull(pj_enable_custom_dropdown2,0) [pj_enable_custom_dropdown2],
isnull(pj_enable_custom_dropdown3,0) [pj_enable_custom_dropdown3],
isnull(pj_custom_dropdown_label1,'') [pj_custom_dropdown_label1],
isnull(pj_custom_dropdown_label2,'') [pj_custom_dropdown_label2],
isnull(pj_custom_dropdown_label3,'') [pj_custom_dropdown_label3]
from projects where pj_id = @pj");
sql = sql.AddParameterWithValue("pj", Convert.ToString((int)dr["project"]));
DataRow project_dr = btnet.DbUtil.get_datarow(sql);
示例2: write_posts
///////////////////////////////////////////////////////////////////////
public static int write_posts(DataSet ds_posts, HttpResponse Response, int bugid, int permission_level, bool write_links, bool images_inline, bool history_inline, bool internal_posts, IIdentity identity)
{
if (Util.get_setting("ForceBordersInEmails","0") == "1")
{
Response.Write ("\n<table id='posts_table' border=1 cellpadding=0 cellspacing=3>");
}
else
{
Response.Write ("\n<table id='posts_table' border=0 cellpadding=0 cellspacing=3>");
}
int post_cnt = ds_posts.Tables[0].Rows.Count;
int bp_id;
int prev_bp_id = -1;
foreach (DataRow dr in ds_posts.Tables[0].Rows)
{
if (!internal_posts)
{
if ((int)dr["bp_hidden_from_external_users"] == 1)
{
continue;
}
}
bp_id = (int) dr["bp_id"];
if ((string)dr["bp_type"] == "update")
{
string comment = (string) dr["bp_comment"];
if (identity.GetTagsFieldPermissionLevel() == PermissionLevel.None
&& comment.StartsWith("changed tags from"))
continue;
if (identity.GetProjectFieldPermissionLevel() == PermissionLevel.None
&& comment.StartsWith("changed project from"))
continue;
if (identity.GetOrgFieldPermissionLevel() == PermissionLevel.None
&& comment.StartsWith("changed organization from"))
continue;
if (identity.GetCategoryFieldPermissionLevel() == PermissionLevel.None
&& comment.StartsWith("changed category from"))
continue;
if (identity.GetPriorityFieldPermissionLevel() == PermissionLevel.None
&& comment.StartsWith("changed priority from"))
continue;
if (identity.GetAssignedToFieldPermissionLevel() == PermissionLevel.None
&& comment.StartsWith("changed assigned_to from"))
continue;
if (identity.GetStatusFieldPermissionLevel() == PermissionLevel.None
&& comment.StartsWith("changed status from"))
continue;
if (identity.GetUdfFieldPermissionLevel() == PermissionLevel.None
&& comment.StartsWith("changed " + Util.get_setting("UserDefinedBugAttributeName","YOUR ATTRIBUTE") + " from"))
continue;
}
if (bp_id == prev_bp_id)
{
// show another attachment
write_email_attachment(Response, bugid, dr, write_links, images_inline);
}
else
{
// show the comment and maybe an attachment
if (prev_bp_id != -1) {
Response.Write ("\n</table>"); // end the previous table
}
write_post(Response, bugid, permission_level, dr, bp_id, write_links, images_inline,
identity.IsInRole(BtnetRoles.Admin),
identity.GetCanEditAndDeletePosts(),
identity.GetIsExternalUser());
if (Convert.ToString(dr["ba_file"]) != "") // intentially "ba"
{
write_email_attachment(Response, bugid, dr, write_links, images_inline);
}
prev_bp_id = bp_id;
}
}
if (prev_bp_id != -1)
//.........这里部分代码省略.........