本文整理汇总了C#中Util.DeleteApplication方法的典型用法代码示例。如果您正苦于以下问题:C# Util.DeleteApplication方法的具体用法?C# Util.DeleteApplication怎么用?C# Util.DeleteApplication使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Util
的用法示例。
在下文中一共展示了Util.DeleteApplication方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DeleteApp_Click
protected void DeleteApp_Click(object sender, ImageClickEventArgs e)
{
Util util = new Util();
Hashtable State = (Hashtable)HttpRuntime.Cache[Session.SessionID];
if (util.CheckSessionTimeout(State, Response, "Default.aspx")) return;
try
{
ClearMessages();
string app = CurrentApp.SelectedValue;
State["SelectedApp"] = app;
util.DeleteApplication(State);
ResetAppStateVariables();
UpdateAppLists();
CurrentApp.SelectedIndex = 0;
//SaveApp.Style.Value = "display:none";
//RememberMessage.Style.Value = "display:none";
DesignMessage.Text = "Select an App or Click the New App Icon";
AppPages.Items.Clear();
Message.Text = app + " has been deleted.";
util.SetDefaultBackgroundForView(State,Constants.IPHONE);
State["SelectedDeviceType"] = Constants.IPHONE;
HideAppControls();
SetViewForDevice();
AppName.Text = "";
}
catch (Exception ex)
{
util.LogError(State, ex);
Message.Text = "Internal Error: " + ex.Message + ": " + ex.StackTrace;
}
}
示例2: MySolutions_ItemDeleted
protected void MySolutions_ItemDeleted(object source, GridDeletedEventArgs e)
{
Util util = new Util();
Hashtable State = (Hashtable)HttpRuntime.Cache[Session.SessionID];
if (util.CheckSessionTimeout(State, Response, "Default.aspx")) return;
int row = e.Item.ItemIndex;
// RadGrid MySolutions = (RadGrid) State["MySolutions"];
string app = MySolutions.Items[row].Cells[2].Text;
//delete app
State["SelectedApp"] = app;
util.DeleteApplication(State);
util.ResetAppStateVariables(State);
LoadData();
}
示例3: SaveAppInDatabase
protected bool SaveAppInDatabase(string app, string page_name)
{
try
{
ClearMessages();
Hashtable State = (Hashtable)HttpRuntime.Cache[Session.SessionID];
State["CreatePageMessage"] = null;
//save application
Util util = new Util();
XmlUtil x_util = new XmlUtil();
State["PageHtml"] = x_util.FilterCanvasOutput(SavedCanvasHtml.Text);
string html = State["PageHtml"].ToString();
if ( State["SelectedDeviceType"] == null /*|| State["SelectedDeviceView"] == null*/)
{
State["SelectedDeviceType"] = Constants.IPHONE;
DeviceType.Text = State["SelectedDeviceType"].ToString();
}
util.CreateApp(State, page_name, State["SelectedDeviceType"].ToString(), AppDescription.Text);
util.SetDefaultButton(State, DefaultButtonImage.Text);
Hashtable duplicates = x_util.EncodeAppPageToAppXml(State, page_name, html);
if (duplicates != null)
{
State["SelectedApp"] = app;
util.DeleteApplication(State);
ResetAppStateVariables();
UpdateAppLists();
AppPages.Items.Clear();
StringBuilder errors = new StringBuilder();
foreach (string duplicate in duplicates.Keys)
{
errors.Append(duplicate + " internal name in current page also found on " + duplicates[duplicate].ToString() + " page; ");
}
Message.Text = errors.ToString() + " This application was not saved because duplicate identifiers are not allowed.";
return false;
}
x_util.SetBackgroundImage(State);
SetViewForDevice();
ShowPage(page_name);
CurrentApp.Items.Add(new RadComboBoxItem(app, app));
CurrentApp.SelectedIndex = CurrentApp.Items.Count - 1;
AppPages.Items.Clear();
AppPages.Items.Add(new RadComboBoxItem(page_name, page_name));
AppPages.SelectedIndex = 0;
SavedCanvasHtml.Text = "";
return true;
}
catch (Exception ex)
{
Util util = new Util();
Hashtable State = (Hashtable)HttpRuntime.Cache[Session.SessionID];
util.LogError(State, ex);
Message.Text = "Internal Error: " + ex.Message + ": " + ex.StackTrace;
return false;
}
}
示例4: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
Util util = new Util();
Hashtable State = (Hashtable)HttpRuntime.Cache[Session.SessionID];
if (util.CheckSessionTimeout(State,Response,"Default.aspx")) return;
try
{
if ( HttpRuntime.Cache["TechSupportEmail"] != null)
{
util.AddEmailToButton(SupportButton, HttpRuntime.Cache["TechSupportEmail"].ToString(), "Email To Tech Support");
}
util.UpdateSessionLog(State, "post", "TabMySolutions");
ClearMessages();
DemoVideo.Attributes.Add("onclick", PopupHelper.GeneratePopupScript(
"Help/MySolutions/DemoVideo.htm", 400, 655, false, false, false, true));
DemoVideo1.Attributes.Add("onclick", PopupHelper.GeneratePopupScript(
"Help/MySolutions/DemoVideo.htm", 400, 655, false, false, false, true));
QuickStart.Attributes.Add("onclick", PopupHelper.GeneratePopupScript(
"Help/MySolutions/QuickStart.aspx", 940, 750, false, false, false, true));
QuickStart1.Attributes.Add("onclick", PopupHelper.GeneratePopupScript(
"Help/MySolutions/QuickStart.aspx", 940, 750, false, false, false, true));
YourFirstApp.Attributes.Add("onclick", PopupHelper.GeneratePopupScript(
"Help/MySolutions/YourFirstApp.htm", 350, 650, false, false, false, true));
YourFirstApp1.Attributes.Add("onclick", PopupHelper.GeneratePopupScript(
"Help/MySolutions/YourFirstApp.htm", 350, 650, false, false, false, true));
Overview.Attributes.Add("onclick", PopupHelper.GeneratePopupScript(
"Help/MySolutions/Overview.aspx", 800, 800, false, false, false, true));
Overview1.Attributes.Add("onclick", PopupHelper.GeneratePopupScript(
"Help/MySolutions/Overview.aspx", 800, 800, false, false, false, true));
if (IsPostBack)
{
if (Request.Form.AllKeys.Length > 0)
{
int last = Request.Form.AllKeys.Length - 1;
for (int i = last; i > last - 3; i--)
{
if (Request.Form.AllKeys[i] != null && Request.Form.AllKeys[i].Contains("$delete."))
{
int start = Request.Form.AllKeys[i].IndexOf("$delete.") + 8;
string[] split = Request.Form.AllKeys[i].Substring(start).Split(".".ToCharArray());
int row = Convert.ToInt32(split[0]);
string app = MySolutions.Items[row].Cells[2].Text;
//delete app
State["SelectedApp"] = app;
util.DeleteApplication(State);
util.ResetAppStateVariables(State);
LoadData();
return;
}
}
}
}
else
{
CopyRight.InnerText = HttpRuntime.Cache["CopyRight"].ToString();
UserLabel.Text = State["Username"].ToString();
LoadData();
}
}
catch (Exception ex)
{
util.ProcessMainExceptions(State, Response, ex);
}
}