本文整理汇总了C#中System.Web.HttpContext.get_User方法的典型用法代码示例。如果您正苦于以下问题:C# HttpContext.get_User方法的具体用法?C# HttpContext.get_User怎么用?C# HttpContext.get_User使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Web.HttpContext
的用法示例。
在下文中一共展示了HttpContext.get_User方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetVehicleConfig_NOLONGERUSED
public static DataSet GetVehicleConfig_NOLONGERUSED(int vehicleId, int firstParam, int noOfBytes, int displayType, HttpContext context, int buildType)
{
int pStatus = 0;
string text = "";
char c = Convert.ToChar(95);
char c2 = Convert.ToChar(48);
DataSet vehicleConfig = DataAccess.GetVehicleConfig(vehicleId, firstParam, buildType);
IEnumerator enumerator = vehicleConfig.get_Tables().get_Item(0).get_Rows().GetEnumerator();
try
{
while (enumerator.MoveNext())
{
DataRow dataRow = (DataRow)enumerator.get_Current();
IEnumerator enumerator2 = dataRow.get_Table().get_Columns().GetEnumerator();
try
{
while (enumerator2.MoveNext())
{
DataColumn dataColumn = (DataColumn)enumerator2.get_Current();
string columnName = dataColumn.get_ColumnName();
if (columnName.StartsWith(Constants.ParamColumnTypes.ValuePrefix))
{
string text2 = columnName.Replace(Constants.ParamColumnTypes.ValuePrefix, Constants.ParamColumnTypes.StatusPrefix);
string[] array = columnName.Split(new char[]
{
c
});
string text3 = array[1].ToString();
string text4 = array[2].ToString();
byte b;
try
{
b = Convert.ToByte(dataRow.get_Item(dataColumn));
}
catch
{
b = 0;
}
switch (displayType)
{
case 1:
text = b.ToString();
break;
case 2:
text = b.ToString("x2").ToUpper();
break;
case 3:
text = Convert.ToString(b, 2).PadLeft(8, c2);
break;
}
try
{
pStatus = Convert.ToInt32(dataRow.get_Item(text2));
}
catch
{
pStatus = 1;
}
string text5 = "<span class=\"" + Common.GetSpanClass(pStatus, 0) + "\">";
if ((context.get_User().IsInRole(Constants.AdminUser) || context.get_User().IsInRole(text4)) && !Convert.ToBoolean(dataRow.get_Item("fldApproved")))
{
object obj = text5;
text5 = string.Concat(new object[]
{
obj,
"<a href=\"pu.aspx?",
Constants.QueryString.VehicleId,
"=",
vehicleId,
"&",
Constants.QueryString.VehicleInstId,
"=",
dataRow.get_Item("fldID"),
"&",
Constants.QueryString.ParameterId,
"=",
text3,
" \">",
text,
"</a>"
});
}
else
{
text5 += text;
}
text5 += "</SPAN>";
dataRow.set_Item(dataColumn, text5);
}
}
}
finally
{
IDisposable disposable = enumerator2 as IDisposable;
if (disposable != null)
{
disposable.Dispose();
}
}
}
//.........这里部分代码省略.........