本文整理汇总了C#中Util.CheckSessionTimeout方法的典型用法代码示例。如果您正苦于以下问题:C# Util.CheckSessionTimeout方法的具体用法?C# Util.CheckSessionTimeout怎么用?C# Util.CheckSessionTimeout使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Util
的用法示例。
在下文中一共展示了Util.CheckSessionTimeout方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddTemplateApp_Click
protected void AddTemplateApp_Click(object sender, EventArgs e)
{
Util util = new Util();
Hashtable State = (Hashtable)HttpRuntime.Cache[Session.SessionID];
if (util.CheckSessionTimeout(State, Response, "../../Default.aspx")) return;
if (AppName.Text.Length == 0)
{
Message.Text = "Enter your own name for this app.";
return;
}
string new_app_name = AppName.Text.Trim();
if (!Check.ValidateObjectName(Message, new_app_name))
{
return;
}
if(util.DoesAppExistInAccount(State,new_app_name))
{
Message.Text = "The app name " + new_app_name + " already exists. Enter a unique app name.";
return;
}
State["NameForTemplateApp"] = new_app_name;
Ready.Text = "OK";
}
示例2: rowType_SelectedIndexChanged
protected void rowType_SelectedIndexChanged(object o, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs e)
{
Hashtable State = (Hashtable)HttpRuntime.Cache[Session.SessionID];
Util util = new Util();
if (util.CheckSessionTimeout(State, Response, "../Default.aspx")) return;
rowType.SelectedValue = e.Value;
switch (e.Value)
{
case "image1text|image,text":
case "imagetext|image,text":
case "2texts|text,text":
case "1texthidden|text,hidden":
FieldNameMessage.Text = "Enter 2 Field Names separated by a comma";
SectionPages.SelectedIndex = 1;
break;
case "image1texthidden|image,text,hidden":
case "2textshidden|text,text,hidden":
case "image2texts|image,text,text":
FieldNameMessage.Text = "Enter 3 Field Names separated by a comma";
SectionPages.SelectedIndex = 2;
break;
case "image2textshidden|image,text,text,hidden":
FieldNameMessage.Text = "Enter 4 Field Names separated by a comma";
SectionPages.SelectedIndex = 3;
break;
default:
FieldNameMessage.Text = "Enter the Field Name";
SectionPages.SelectedIndex = 0;
break;
}
}
示例3: BuyButton_Click
protected void BuyButton_Click(object sender, EventArgs e)
{
Hashtable State = (Hashtable)HttpRuntime.Cache[Session.SessionID];
Util util = new Util();
if (util.CheckSessionTimeout(State, Response, "Default.aspx")) return;
Response.Redirect("http://stores.homestead.com/MobiFlexStore/StoreFront.bok", true);
}
示例4: DesignedForDevice_SelectedIndexChanged
protected void DesignedForDevice_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e)
{
Util util = new Util();
Hashtable State = (Hashtable)HttpRuntime.Cache[Session.SessionID];
if (util.CheckSessionTimeout(State, Response, "Default.aspx")) return;
try
{
ClearMessages();
DesignedForDevice.Text = e.Text;
string device_design = e.Value;
DeviceType.Text = e.Text;
XmlUtil x_util = new XmlUtil();
string previous_device_design = x_util.GetAppDeviceType(State);
//State["SelectedDeviceView"] = device_design;
State["SelectedDeviceType"] = device_design;
if (State["SelectedApp"] == null || State["SelectedApp"].ToString().Contains("->"))
{
util.SetDefaultBackgroundForView(State,device_design);
}
x_util.SetAppDeviceType(State, previous_device_design, device_design);
Message.Text = "Main device for App has been set.";
}
catch (Exception ex)
{
util.LogError(State, ex);
Message.Text = "Internal Error: " + ex.Message + ": " + ex.StackTrace;
}
}
示例5: GetSpreadsheets_Click
protected void GetSpreadsheets_Click(object sender, EventArgs e)
{
Hashtable State = (Hashtable)HttpRuntime.Cache[Session.SessionID];
Util util = new Util();
if (util.CheckSessionTimeout(State, Response, "../Default.aspx")) return;
ClearMessages();
if (! State["AccountType"].ToString().Contains("google_apps"))
{
if (Username.Text.Length == 0)
{
SaveGoogleDocsInfoMessage.Text = "Enter your Google Docs account username.";
return;
}
if (Password.Text.Length == 0)
{
SaveGoogleDocsInfoMessage.Text = "Enter your Google Docs account password.";
return;
}
else
State["GDocsPassword"] = Password.Text.Trim();
}
GDocs gDocs = new GDocs();
String ret = gDocs.GetSpreadsheets(State, AccountSpreadsheets, Username.Text.Trim(),Password.Text.Trim());
if (ret != "OK")
SaveGoogleDocsInfoMessage.Text = "Either the username or password was not valid. "+ ret;
}
示例6: pickerType_SelectedIndexChanged
protected void pickerType_SelectedIndexChanged(object o, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs e)
{
Hashtable State = (Hashtable)HttpRuntime.Cache[Session.SessionID];
Util util = new Util();
if (util.CheckSessionTimeout(State, Response, "../Default.aspx")) return;
pickerType.SelectedValue = e.Value;
SectionMessage.Visible = true;
section_names.Visible = true;
switch (e.Value)
{
case "time":
case "date":
SectionMessage.Visible = false;
section_names.Visible = false;
SectionPages.SelectedIndex = 0;
break;
case "1_section":
SectionMessage.Text = "Enter the Section Name";
SectionPages.SelectedIndex = 1;
break;
case "2_sections":
SectionMessage.Text = "Enter 2 Section Names separated by a comma";
SectionPages.SelectedIndex = 2;
break;
case "3_sections":
SectionMessage.Text = "Enter 3 Section Names separated by commas";
SectionPages.SelectedIndex = 3;
break;
case "4_sections":
SectionMessage.Text = "Enter 4 Section Names separated by commas";
SectionPages.SelectedIndex = 4;
break;
}
}
示例7: ResetDataResponseMap_Click
public void ResetDataResponseMap_Click(object sender, EventArgs e)
{
Util util = new Util();
Hashtable State = (Hashtable)HttpRuntime.Cache[Session.SessionID];
if (util.CheckSessionTimeout(State, Response, "Default.aspx")) return;
ClearMessages();
XmlDocument doc = util.GetStagingAppXml(State);
XmlNode web_service_data_responses = doc.SelectSingleNode("//web_service_data_responses");
if (web_service_data_responses != null)
{
web_service_data_responses.RemoveAll();
}
XmlNode phone_data_requests = doc.SelectSingleNode("//phone_data_requests");
if (phone_data_requests == null)
return;
XmlNodeList event_fields = phone_data_requests.SelectNodes("phone_data_request/event_field");
foreach (XmlNode event_field in event_fields)
{
XmlNode phone_data_request = event_field.ParentNode;
XmlNodeList output_mappings = phone_data_request.SelectNodes("output_mapping");
foreach (XmlNode output_mapping in output_mappings)
{
phone_data_request.RemoveChild(output_mapping);
}
}
util.UpdateStagingAppXml(State);
BuildWebServiceDataTrees(WebServiceEvents.SelectedItem.Text);
ResponseMessage.Text = "Response Map Reset.";
ResponseTreeEdits.Text = "";
}
示例8: ManageDataApps_SelectedIndexChanged
/***************************************** Common Functions *******************************/
public void ManageDataApps_SelectedIndexChanged(object sender, EventArgs e)
{
Util util = new Util();
Hashtable State = (Hashtable)HttpRuntime.Cache[Session.SessionID];
if (util.CheckSessionTimeout(State, Response, "Default.aspx")) return;
ClearMessages();
State["ManageDataType"] = null;
string app_name = Request.Form.Get("ManageDataApps");
if (!app_name.Contains("->"))
{
State["SelectedApp"] = app_name;
ManageDataApps.SelectedValue = app_name;
InitDataTrees(app_name);
ViewStoryBoard.Style.Value = "";
ManageDataType.Style.Value = "";
ManageDataTypeLabel.Style.Value = "";
}
else
{
ManageDataType.Style.Value = "display:none";
ManageDataTypeLabel.Style.Value = "display:none";
ViewStoryBoard.Style.Value = "display:none";
util.ResetAppStateVariables(State);
ContentMultiPage.SelectedIndex = 0;
ShouldRefreshStoryBoard.Text = "close";
Init init = new Init();
init.InitManageDataAppsList(State);
DataMultiPage.SelectedIndex = 3;
}
}
示例9: Save_Click
protected void Save_Click(object sender, EventArgs e)
{
Util util = new Util();
Hashtable State = (Hashtable)HttpRuntime.Cache[Session.SessionID];
if (util.CheckSessionTimeout(State, Response, "../../Default.aspx")) return;
string name = UrlAccountIdentifier.Value.Trim();
if (name.Length == 0)
{
Message.Text = "Enter Account Identifier Name";
return;
}
if (!IsStringAlphaNumericPeriod(name) || name == ".")
{
Message.Text = "Domain Name should only use alphanumeric characters or '.'";
return;
}
if (util.DoesUrlAccountIdentifierExist((Hashtable)HttpRuntime.Cache[Session.SessionID], name))
Message.Text = "Account Identifier " + name + " is not Available.";
else
{
UrlAccountIdentifier.Value = name;
util.SaveUrlAccountIdentifier((Hashtable)HttpRuntime.Cache[Session.SessionID], name);
State["UrlAccountIdentifier"] = name;
Message.Text = "Account Identifier " + name + " has been saved. ";
}
}
示例10: Page_Load
// Data members
protected void Page_Load(object sender, EventArgs e)
{
Init init = new Init();
Util util = new Util();
try
{
Hashtable State = (Hashtable)HttpRuntime.Cache[Session.SessionID];
if (util.CheckSessionTimeout(State, Response, "Default.aspx")) return;
if ( HttpRuntime.Cache["TechSupportEmail"] != null)
{
util.AddEmailToButton(SupportButton, HttpRuntime.Cache["TechSupportEmail"].ToString(), "Email To Tech Support");
}
util.UpdateSessionLog(State, "post", "TabPublish");
if (!IsPostBack)
{
CopyRight.InnerText = HttpRuntime.Cache["CopyRight"].ToString();
UserLabel.Text = State["Username"].ToString();
}
// SeeAllFields.Attributes.Add("onclick", "javascript: PopUp('../Help/Design/ViewAllNativeFields.htm', 'height=800, width=800, left=200, top=200, menubar=no, status=no, location=no, toolbar=no, scrollbars=yes, resizable=yes');return false;");
// LayoutVideo.Attributes.Add("onclick", "javascript: PopUp('../Help/Design/LayoutVideo.htm', 'height=325, width=570, left=200, top=200, menubar=no, status=no, location=no, toolbar=no, scrollbars=no, resizable=no');return false;");
// BasicFieldsVideo.Attributes.Add("onclick", "javascript: PopUp('../Help/Design/BasicFieldsVideo.htm', 'height=325, width=570, left=200, top=200, menubar=no, status=no, location=no, toolbar=no, scrollbars=no, resizable=no');return false;");
}
catch (Exception ex)
{
System.Diagnostics.Debug.WriteLine(ex.Message.ToString());
throw;
}
}
示例11: EventField_SelectedIndexChanged
protected void EventField_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
{
Hashtable State = (Hashtable)HttpRuntime.Cache[Session.SessionID];
Util util = new Util();
if (util.CheckSessionTimeout(State, Response, "../Default.aspx")) return;
string selected_event_field = e.Text;
if (selected_event_field.Contains("->"))
{
State["DataSourceEventType"] = null;
State["DataSourceEventField"] = null;
}
else if (selected_event_field.Contains("("))
{
State["DataSourceEventType"] = "page";
State["DataSourceEventField"] = null;
}
else
{
State["DataSourceEventType"] = "field";
State["DataSourceEventField"] = selected_event_field;
}
State["DBCommands"] = null;
EventField.FindItemByText(selected_event_field).Selected = true;
if (selected_event_field.Contains("->"))
ManageDataPanel.Style.Value = ManageDataPanel.Style.Value.Replace("block", "none");
else
ManageDataPanel.Style.Value = ManageDataPanel.Style.Value.Replace("none", "block");
}
示例12: NumberOfUsers_SelectedIndexChanged
protected void NumberOfUsers_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
{
NumberOfUsers.SelectedValue = e.Value;
NumberOfUsers.Text = e.Text;
Util util = new Util();
Hashtable State = (Hashtable)HttpRuntime.Cache[Session.SessionID];
if (util.CheckSessionTimeout(State, Response, "../../Default.aspx")) return;
if (NumberOfUsers.SelectedIndex == 1)
{
LimitedUsersPanel.Style.Value = "";
UploadPublishedUserCredentials.Style.Value = "display:none";
ViewPublishedUserCredentials.Style.Value = "display:none";
}
else
{
util.SetLimitedUsersCredentialMethod(State, false, "", "");
LimitedUsersPanel.Style.Value = "display:none";
UploadPublishedUserCredentials.Style.Value = "";
ViewPublishedUserCredentials.Style.Value = "";
UploadPublishedUserCredentials.Attributes.Add("onclick", PopupHelper.GeneratePopupScript(
"../../Dialogs/Publish/UploadUserCredentials.aspx", 350, 800, false, false, false, true));
ViewPublishedUserCredentials.Attributes.Add("onclick", PopupHelper.GeneratePopupScript(
"../../Dialogs/Publish/ViewUserCredentials.aspx", 800, 350, false, false, false, true));
}
}
示例13: CopyApplicationButton_Click
protected void CopyApplicationButton_Click(object sender, EventArgs e)
{
Util util = new Util();
Hashtable State = (Hashtable)HttpRuntime.Cache[Session.SessionID];
if (util.CheckSessionTimeout(State, Response, "../Default.aspx")) return;
if (Applications.Text.IndexOf("->") > 0)
{
Message.Text = "Select Application.";
return;
}
if (ToAccounts.Text.IndexOf("->") > 0)
{
Message.Text = "Select Destination Account.";
return;
}
if (ToAccounts.Text == FromAccounts.Text)
{
Message.Text = "Select a Different Destination Account.";
return;
}
string app_name = Applications.SelectedItem.Text;
//copy application
util.CopyAppToAccount(State, app_name);
Message.Text = "Application Copy is Successful.";
}
示例14: Credentials_SortCommand
protected void Credentials_SortCommand(object source, Telerik.Web.UI.GridSortCommandEventArgs e)
{
Util util = new Util();
Hashtable State = (Hashtable)HttpRuntime.Cache[Session.SessionID];
if (util.CheckSessionTimeout(State, Response, "../../Default.aspx")) return;
ShowCredentials();
}
示例15: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
HelpClick.Attributes.Add("onclick", PopupHelper.GeneratePopupScript(
"../../Help/Design/AppTypeHelp.htm", 260, 530, false, false, false, false));
Util util = new Util();
Hashtable State = (Hashtable)HttpRuntime.Cache[Session.SessionID];
if (util.CheckSessionTimeout(State, Response, "Default.aspx")) return;
XmlUtil x_util = new XmlUtil();
AppType.Items.Clear();
AppType.Items.Add(new RadComboBoxItem("Select ->", "->"));
switch (State["SelectedAppType"].ToString())
{
case Constants.NATIVE_APP_TYPE:
AppType.Items.Add(new RadComboBoxItem("Web App Type (no accecss to native device resources)", Constants.WEB_APP_TYPE));
AppType.Items.Add(new RadComboBoxItem("Hybrid App Type", Constants.HYBRID_APP_TYPE));
break;
case Constants.WEB_APP_TYPE:
AppType.Items.Add(new RadComboBoxItem("Native App Type", Constants.NATIVE_APP_TYPE));
AppType.Items.Add(new RadComboBoxItem("Hybrid App Type", Constants.HYBRID_APP_TYPE));
break;
case Constants.HYBRID_APP_TYPE:
AppType.Items.Add(new RadComboBoxItem("Web App Type (no accecss to native device resources)", Constants.WEB_APP_TYPE));
AppType.Items.Add(new RadComboBoxItem("Native App Type", Constants.NATIVE_APP_TYPE));
break;
}
}
}