本文整理汇总了C#中SobekCM.Library.Users.User_Object.Get_Setting方法的典型用法代码示例。如果您正苦于以下问题:C# User_Object.Get_Setting方法的具体用法?C# User_Object.Get_Setting怎么用?C# User_Object.Get_Setting使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SobekCM.Library.Users.User_Object
的用法示例。
在下文中一共展示了User_Object.Get_Setting方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Track_Item_MySobekViewer
/// <summary> Constructor for a new instance of the Track_Item_MySobekViewer class </summary>
/// <param name="User"> Authenticated user information </param>
/// <param name="Current_Mode"> Mode / navigation information for the current request</param>
/// <param name="Tracer">Trace object keeps a list of each method executed and important milestones in rendering</param>
public Track_Item_MySobekViewer(User_Object User, SobekCM_Navigation_Object Current_Mode, Custom_Tracer Tracer)
: base(User)
{
Tracer.Add_Trace("Track_Item_MySobekViewer.Constructor", String.Empty);
currentMode = Current_Mode;
//If there is no user, go back
if (user == null)
{
currentMode.My_Sobek_Type = My_Sobek_Type_Enum.Home;
HttpContext.Current.Response.Redirect(currentMode.Redirect_URL());
}
//Initialize variables
tracking_users = new DataTable();
user_list = new Dictionary<string, User_Object>();
scanners_list = new List<string>();
//Determine the page
page = 1;
if ((HttpContext.Current.Session["Selected_Tab"] != null) && !(String.IsNullOrEmpty(HttpContext.Current.Session["Selected_Tab"].ToString())) && HttpContext.Current.Session["Selected_Tab"] == "2")
page = 2;
string sub_page = HttpContext.Current.Request.Form["tracking_new_page"] ?? "";
if (sub_page == "2")
{
page = 2;
HttpContext.Current.Session["Selected_Tab"] = "2";
}
else if (sub_page == "1")
{
page = 1;
HttpContext.Current.Session["Selected_Tab"] = "1";
}
//Get the list of users who are possible Scanning/Processing technicians from the DB
tracking_users = Database.SobekCM_Database.Tracking_Get_Users_Scanning_Processing();
foreach (DataRow row in tracking_users.Rows)
{
User_Object temp_user = new User_Object();
temp_user.UserName = row["UserName"].ToString();
temp_user.Given_Name = row["FirstName"].ToString();
temp_user.Family_Name = row["LastName"].ToString();
temp_user.Email = row["EmailAddress"].ToString();
user_list.Add(temp_user.UserName, temp_user);
}
if (!user_list.ContainsKey(User.UserName))
user_list.Add(User.UserName, User);
//Get the list of scanning equipment
DataTable scanners = new DataTable();
scanners = Database.SobekCM_Database.Tracking_Get_Scanners_List();
foreach (DataRow row in scanners.Rows)
{
scanners_list.Add(row["ScanningEquipment"].ToString());
}
//See if there were any hidden requests
hidden_request = HttpContext.Current.Request.Form["Track_Item_behaviors_request"] ?? String.Empty;
hidden_value = HttpContext.Current.Request.Form["Track_Item_hidden_value"] ?? String.Empty;
//Get the equipment value
//if (HttpContext.Current.Session["Equipment"] != null && !String.IsNullOrEmpty(HttpContext.Current.Session["Equipment"].ToString()))
// equipment = HttpContext.Current.Session["Equipment"].ToString();
if (User.Get_Setting("Track_Item_MySobekViewer:Equipment") != null && !String.IsNullOrEmpty(User.Get_Setting("Track_Item_MySobekViewer:Equipment").ToString()))
equipment = User.Get_Setting("Track_Item_MySobekViewer:Equipment").ToString();
else
{
equipment = scanners_list[0];
User.Add_Setting("Track_Item_MySobekViewer:Equipment", equipment);
// HttpContext.Current.Session["Equipment"] = equipment;
}
//Check the hidden value to see if equipment was previously changed
if (!String.IsNullOrEmpty(HttpContext.Current.Request.Form["hidden_equipment"]))
{
equipment = HttpContext.Current.Request.Form["hidden_equipment"];
// HttpContext.Current.Session["equipment"] = equipment;
User.Add_Setting("Track_Item_MySobekViewer:Equipment", equipment);
}
//Also get the currently selected user
if (HttpContext.Current.Session["Selected_User"] != null)
current_selected_user = (User_Object)HttpContext.Current.Session["Selected_User"];
else
{
current_selected_user = User;
HttpContext.Current.Session["Selected_User"] = current_selected_user;
}
//.........这里部分代码省略.........