本文整理汇总了C#中Util.ProcessMainExceptions方法的典型用法代码示例。如果您正苦于以下问题:C# Util.ProcessMainExceptions方法的具体用法?C# Util.ProcessMainExceptions怎么用?C# Util.ProcessMainExceptions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Util
的用法示例。
在下文中一共展示了Util.ProcessMainExceptions方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetActiveCustomers_Click
protected void GetActiveCustomers_Click(object sender, EventArgs e)
{
Hashtable State = (Hashtable)HttpRuntime.Cache[Session.SessionID];
string NoActiveUsersList = Server.MapPath("../../") + @"\App_Data\NoActiveUsersList.txt";
string[] lines = File.ReadAllLines(NoActiveUsersList);
Hashtable NoActiveUsersTable = new Hashtable();
foreach (string line in lines)
{
NoActiveUsersTable[line] = true;
}
Util util = new Util();
try
{
//Instantiate an instance of license and set the license file through its path
string query = "SELECT * FROM customers WHERE last_use_date_time>SUBDATE(NOW(),INTERVAL " + ActiveUsersDaysLoggedIn.Text + " DAY) AND n_logins>=" + ActiveUsersMinNLogins.Text;
DB db = new DB();
DataTable myDataTable = db.GetDataTable(query);
Grid.DataSource = myDataTable;
Grid.DataBind();
Grid.MasterTableView.ExportToExcel();
}
catch (Exception ex)
{
util.ProcessMainExceptions(State, Response, ex);
}
}
示例2: 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
{
Message.Text = "";
State["CustomHeaderHTML"]= Header.Text = util.GetCustomHeaderHTML(State);
Upload.Attributes.Add("onclick", "NamedPopUp('UploadCustomHeaderHtml.aspx','UploadCustomHeaderHtmlPopup' ,'height=150, width=500, menubar=no, status=no, location=no, toolbar=no, scrollbars=yes, resizable=yes');return false;");
}
catch (Exception ex)
{
util.ProcessMainExceptions((Hashtable)HttpRuntime.Cache[Session.SessionID], Response, ex);
}
}
示例3: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
Hashtable State = (Hashtable)HttpRuntime.Cache[Session.SessionID];
Util util = new Util();
if (util.CheckSessionTimeout(State, Response, "Default.aspx")) return;
try
{
Message.Text = "";
ToEmail.Text = Request.QueryString.Get("email");
EmailType.Text = Request.QueryString.Get("type");
//fill in customers applications
string sql = "SELECT application_name FROM applications WHERE customer_id='" + State["CustomerID"].ToString() + "' ORDER BY application_name";
DB db = new DB();
DataRow[] rows = db.ViziAppsExecuteSql(State, sql);
ApplicationList.Items.Clear();
if (rows != null && rows.Length > 0)
{
foreach (DataRow row in rows)
{
ApplicationList.Items.Add(row["application_name"].ToString());
}
}
ApplicationList.Items.Insert(0, "No Application Issue");
sql = "SELECT email FROM customers WHERE customer_id='" + State["CustomerID"].ToString() + "'";
string from = db.ViziAppsExecuteScalar(State, sql);
if (EmailType.Text == "Customer Email")
{
FromEmail.Text = HttpRuntime.Cache["TechSupportEmail"].ToString();
}
else if (from == null)
{
FromEmail.Text = "";
}
else
{
FromEmail.Text = from;
}
db.CloseViziAppsDatabase(State);
}
catch (Exception ex)
{
util.ProcessMainExceptions(State, Response, ex);
}
}
示例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
{
string logout_user = Request.Form.Get("logout_user");
if (logout_user != null && logout_user.Length > 0)
{
SessionLogout_Click(logout_user);
}
DataTable table = new DataTable("Current ViziApps Users");
table.Columns.Add("Username");
Hashtable UsersList = (Hashtable)HttpRuntime.Cache["UsersList"];
foreach(string key in UsersList.Keys)
{
string[] row_data = new string[1];
row_data[0]= key;
table.Rows.Add(row_data);
}
DataSet dsSrc = new DataSet();
dsSrc.Tables.Add(table);
CurrentUsers.DataSource = dsSrc;
CurrentUsers.DataBind();
foreach (GridViewRow row in CurrentUsers.Rows)
{
string username = row.Cells[0].Text;
ImageButton logout = (ImageButton)row.Cells[1].Controls[0];
logout.ID = "logout_" + username;
logout.Attributes.Add("onclick", "setUsername('" + username + "'); return confirm('Are you sure you want to logout this user?');");
}
}
catch (Exception ex)
{
util.ProcessMainExceptions((Hashtable)HttpRuntime.Cache[Session.SessionID], Response, ex);
}
}
示例5: 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 (!IsPostBack)
{
CopyRight.InnerText = HttpRuntime.Cache["CopyRight"].ToString();
UserLabel.Text = State["Username"].ToString();
}
if ( HttpRuntime.Cache["TechSupportEmail"] != null)
{
util.AddEmailToButton(SupportButton, HttpRuntime.Cache["TechSupportEmail"].ToString(), "Email To Tech Support");
}
}
catch (Exception ex)
{
util.ProcessMainExceptions(State, Response, ex);
}
}
示例6: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
Util util = new Util();
Init init = new Init();
Hashtable State = (Hashtable)HttpRuntime.Cache[Session.SessionID];
try
{
if (State == null || State.Count <= 2) { Page.ClientScript.RegisterStartupScript(this.GetType(), Guid.NewGuid().ToString(), "timeOut('../Default.aspx');", true); return; }
{
if (!Page.IsPostBack)
{
if (InitAppsList(State, RadComboAppSelector) == false)
{
//There are no Apps which can add a NEW Service at this moment.
RadNotification1.Title = "WARNING";
RadNotification1.Text = "There are no Apps with Billing History";
RadNotification1.Visible = true;
RadNotification1.Show();
}
/*if ((State["SelectedApp"] != null) && State["SelectedApp"].ToString() != "")
{
RadComboAppSelector.SelectedValue = State["SelectedApp"].ToString();
}*/
}
}
}
catch (Exception ex)
{
util.ProcessMainExceptions(State, Response, ex);
}
}
示例7: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
Hashtable State = (Hashtable)HttpRuntime.Cache[Session.SessionID];
Util util = new Util();
if (util.CheckSessionTimeout(State, Response, "Default.aspx")) return;
State["CustomersByAccount"] = CustomersByAccount;
State["CustomersByEmail"] = CustomersByEmail;
if (!IsPostBack)
{
if (State["Password"] == null)
{
Response.Redirect("Default.aspx", false);
return;
}
string status = util.LoginToViziApps(State, State["Username"].ToString(),
State["Password"].ToString());
if (status != "admin")
{
Response.Redirect("Default.aspx", false);
return;
}
ClearMessages();
try
{
if ( State["ServerAdminCustomerID"] == null || State["ServerAdminCustomerID"].ToString() == "0")
{
State["ServerAdminCustomerID"] = "0";
Init init = new Init();
init.InitApplicationCustomers(State);
}
if (!Page.IsPostBack)
{
ViewUserProfile.Attributes.Add("onclick", PopupHelper.GeneratePopupScript(
"Dialogs/Admin/ViewUserProfile.aspx", 750, 750, true, true, true, true));
// ViewAllCustomers.Attributes.Add("onclick", PopupHelper.GeneratePopupScript(
// "Dialogs/Admin/ViewAllCustomers.aspx", 10, 10, true, true, true, true));
ViewActiveCustomers.Attributes.Add("onclick", PopupHelper.GeneratePopupScript(
"Dialogs/Admin/ViewActiveCustomers.aspx", 120, 550, true, true, true, true));
ViewCurrentUsers.Attributes.Add("onclick", PopupHelper.GeneratePopupScript(
"Dialogs/Admin/ViewCurrentUsers.aspx", 480, 500, true, true, true, true));
this.EmailCustomers.Attributes.Add("onclick", PopupHelper.GeneratePopupScript(
"Dialogs/Admin/AdminEmail.aspx", 900, 800, true, true, true, true));
ShowXmlDesign.Attributes.Add("onclick", PopupHelper.GeneratePopupScript(
"Dialogs/Admin/ShowXmlDesign.aspx", 750, 750, true, true, true, true));
HideForCustomers();
}
}
catch (Exception ex)
{
util.ProcessMainExceptions(State, Response, ex);
}
}
}
示例8: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
Util util = new Util();
Hashtable State = (Hashtable)HttpRuntime.Cache[Session.SessionID];
if (State == null || State.Count <= 2) { Page.ClientScript.RegisterStartupScript(this.GetType(), Guid.NewGuid().ToString(), "timeOut('../Default.aspx');", true); return; }
util.UpdateSessionLog(State, "post", "MyProfile");
try
{
if( State["ServerAdminCustomerUsername"] != null)
UsernameLabel.Text = State["ServerAdminCustomerUsername"].ToString();
else
UsernameLabel.Text = State["Username"].ToString();
Message.Text = "";
string sql = null;
if ( State["Username"].ToString() != "admin")
{
sql = "SELECT * FROM customers WHERE customer_id='" + State["CustomerID"].ToString() + "'";
}
else
{
sql = "SELECT * FROM customers WHERE customer_id='" + State["ServerAdminCustomerID"].ToString() + "'";
}
DB db = new DB();
DataRow[] rows = db.ViziAppsExecuteSql(State, sql);
DataRow row = rows[0];
PasswordTextBox.Text = "";
ConfirmPasswordBox.Text = "";
CompanyTextBox.Text = SQLDecode(row["company"].ToString());
RoleTextBox.Text = SQLDecode(row["role"].ToString());
FirstNameTextBox.Text = SQLDecode(row["first_name"].ToString());
LastNameTextBox.Text = SQLDecode(row["last_name"].ToString());
StreetTextBox.Text = row["street_address"].ToString();
CityTextBox.Text = SQLDecode(row["city"].ToString());
if (row["state"] != null && row["state"].ToString().Length > 0)
StateList.Text = row["state"].ToString();
PostalCodeTextBox.Text = row["postal_code"].ToString();
CountryTextBox.Text = SQLDecode(row["country"].ToString());
PhoneTextbox.Text = row["phone"].ToString();
EmailTextBox.Text = row["email"].ToString();
string status = row["status"].ToString();
db.CloseViziAppsDatabase(State);
TimeZones zone_util = new TimeZones();
string default_time_zone_delta_hours = row["default_time_zone_delta_hours"].ToString();
zone_util.InitTimeZones(State, DateTime.Now.ToUniversalTime(), TimeZoneList, default_time_zone_delta_hours);
string force_1_user_sessions = row["force_1_user_sessions"].ToString();
Force1UserSessions.Checked = force_1_user_sessions == "1" || force_1_user_sessions.ToLower() == "true";
}
catch (Exception ex)
{
util.ProcessMainExceptions(State, Response, ex);
}
}
示例9: Page_Load
//.........这里部分代码省略.........
}
if (!IsPostBack)
{
DB db = new DB();
StringBuilder b_sql = new StringBuilder("SELECT * FROM applications ");
b_sql.Append("WHERE application_name='" + State["SelectedApp"].ToString() + "'");
b_sql.Append(" AND customer_id='" + State["CustomerID"].ToString() + "'");
DataRow[] rows = db.ViziAppsExecuteSql(State, b_sql.ToString());
DataRow row = rows[0];
if (row["production_app_name"] != null)
ProductionAppName.Text = row["production_app_name"].ToString();
if (row["production_app_xml"] != DBNull.Value)
ProductionDesignExists.Visible = true;
else
ProductionDesignExists.Visible = false;
bool use_1_user_credential = false;
if (row["use_1_user_credential"] != DBNull.Value)
{
string use_1_cred = row["use_1_user_credential"].ToString();
use_1_user_credential = (use_1_cred.ToLower() == "true") ? true : false;
}
bool has_unlimited_users = false;
if (row["has_unlimited_users"] != DBNull.Value)
{
string has_unlimited = row["has_unlimited_users"].ToString();
has_unlimited_users = (has_unlimited.ToLower() == "true") ? true : false;
}
if (use_1_user_credential)
{
NumberOfUsers.Style.Value = "";
NumberOfUsersLabel.Style.Value = "";
NumberOfUsers.SelectedIndex = 1;
ArrayList credential = util.GetEndUserCredentials(State);
if (credential != null && credential.Count > 0)
{
string[] output = (string[])credential[0];
SingleUsername.Text = output[0];
SinglePassword.Text = output[1];
}
LimitedUsersPanel.Style.Value = "";
}
else if (has_unlimited_users)
{
NumberOfUsers.Style.Value = "display:none";
NumberOfUsersLabel.Style.Value = "display:none";
LimitedUsersPanel.Style.Value = "display:none";
}
else
{
long max_users = util.GetMaxUsers(State);
if (max_users > 1000)
{
NumberOfUsers.Style.Value = "display:none";
NumberOfUsersLabel.Style.Value = "display:none";
LimitedUsersPanel.Style.Value = "display:none";
util.SetUnlimitedUsers(State);
}
else
{
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));
}
}
b_sql = new StringBuilder("SELECT * FROM branding_images ");
b_sql.Append("WHERE application_id='" + State["ApplicationID"].ToString() + "'");
rows = db.ViziAppsExecuteSql(State, b_sql.ToString());
foreach (DataRow image_row in rows)
{
if (image_row["type"].ToString() == "icon" && image_row["width"].ToString() == "512")
{
LargeIconButton.Visible = true;
DeleteIcon.Visible = true;
}
if (image_row["type"].ToString() == "splash")
{
ScreenSplashButton.Visible = true;
DeleteSplashImage.Visible = true;
}
}
db.CloseViziAppsDatabase(State);
}
}
catch (Exception ex)
{
util.ProcessMainExceptions(State, Response, ex);
}
}
示例10: 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;
Init init = new Init();
try
{
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", "TabDesignWeb");
ClearMessages();
if (!IsPostBack)
{
CopyRight.InnerText = HttpRuntime.Cache["CopyRight"].ToString();
UserLabel.Text = State["Username"].ToString();
if (CurrentApp.Items.Count == 0 || CurrentApp.SelectedValue.Contains("->") ||
State["SelectedApp"] == null)
{
init.InitAppsList(State, CurrentApp);
}
State["SelectedAppType"] = Constants.WEB_APP_TYPE;
AppType.Text = Constants.WEB_APP_TYPE;
State["UrlAccountIdentifier"] = util.GetUrlAccountIdentifier(State);
UrlAccountIdentifier.Text = State["UrlAccountIdentifier"].ToString();
if (State["SelectedApp"] == null || !util.DoesAppExist(State) || CurrentApp.SelectedIndex == 0)
{
InitCurrentApp("->");
State["SelectedDeviceType"] = Constants.IPHONE;
DeviceType.Text = State["SelectedDeviceType"].ToString();
}
else if (State["SelectedApp"] != null)
{
InitCurrentApp(State["SelectedApp"].ToString());
}
}
DeletePage.Attributes.Add("onclick", "return confirm('Are you sure you want to delete this page?');");
if (State["ResetConfigApps"] != null)
{
State["SelectedApp"] = null;
init.InitAppsList(State, CurrentApp);
State["ResetConfigApps"] = null;
}
State["WebServiceValidated"] = null;
if (State["SelectedDeviceType"] == null)
{
State["SelectedDeviceType"] = Constants.IPHONE;
DeviceType.Text = State["SelectedDeviceType"].ToString();
}
SetAllAppNames();
}
catch (Exception ex)
{
util.ProcessMainExceptions(State, Response, ex);
}
}
示例11: Page_Load
//private PlanCodeEnum nativePlanCode = 0;
protected void Page_Load(object sender, EventArgs e)
{
Util util = new Util();
Hashtable State = (Hashtable)HttpRuntime.Cache[Session.SessionID];
try
{
if (State == null || State.Count <= 2) { Page.ClientScript.RegisterStartupScript(this.GetType(), Guid.NewGuid().ToString(), "timeOut('../Default.aspx');", true); return; }
{
if (!Page.IsPostBack)
{
Android.Visible = false;
ios.Visible = false;
SubmitButton.Visible = false;
USERINFO.Visible = false;
if (InitAppsList(State, RadComboAppSelector) == false)
{
//There are no Apps which can add a NEW Service at this moment.
RadNotification1.Title = "WARNING";
RadNotification1.Text = "There are no Apps that can be submitted for App Store Preparation.";
RadNotification1.Visible = true;
RadNotification1.Show();
}
/* if ((State["SelectedApp"] != null) && State["SelectedApp"].ToString() != "")
{
RadComboAppSelector.SelectedValue = State["SelectedApp"].ToString();
}*/
//if (RadComboAppSelector.Items.Count == 0 || RadComboAppSelector.SelectedValue.Contains("->") || State["SelectedApp"] == null)
}
}
}
catch (Exception ex)
{
util.ProcessMainExceptions(State, Response, ex);
}
}
示例12: Page_Load
//.........这里部分代码省略.........
}
else
{
//SubmitForProvisioning.Visible = false;
PurchaseButton.Visible = true;
//ProvisioningMessage.Text = "You can fill this form any time, but to submit your app for production, you need to first purchase one of the ViziApps services to submit the app to an app store.";
PurchaseButton.Attributes.Add("onclick", PopupHelper.GeneratePopupScript(
"http://stores.homestead.com/MobiFlexStore/StoreFront.bok", 700, 900, false, false, false, true));
}
if (!IsPostBack)
{
XmlUtil x_util = new XmlUtil();
//State["SelectedDeviceView"] =
State["SelectedDeviceType"] = x_util.GetAppDeviceType(State);
if (State["SelectedDeviceType"] == null)
{
// State["SelectedDeviceView"] =
State["SelectedDeviceType"] = Constants.IPHONE;
}
//check on device type
switch(State["SelectedDeviceType"].ToString())
{
case Constants.IPAD:
SplashUploadLabel.Text = "Splash Image ( 768 X 1004 pixels from .jpg file )";
ScreenSplashButton.Attributes.Add("onclick", PopupHelper.GeneratePopupScript(
"ScreenShot.aspx", 1004, 768, false, false, false, true));
break;
case Constants.ANDROID_TABLET:
SplashUploadLabel.Text = "Splash Image ( 800 X 1233 pixels from .jpg file )";
ScreenSplashButton.Attributes.Add("onclick", PopupHelper.GeneratePopupScript(
"ScreenShot.aspx", 1233, 800, false, false, false, true));
break;
case Constants.IPHONE:
SplashUploadLabel.Text = "Splash Image ( 320 X 460 pixels from .jpg file )";
ScreenSplashButton.Attributes.Add("onclick", PopupHelper.GeneratePopupScript(
"ScreenShot.aspx", 460, 320, false, false, false, true));
break;
case Constants.ANDROID_PHONE:
SplashUploadLabel.Text = "Splash Image ( 320 X 508 pixels from .jpg file )";
ScreenSplashButton.Attributes.Add("onclick", PopupHelper.GeneratePopupScript(
"ScreenShot.aspx", 508, 320, false, false, false, true));
break;
}
SelectedDeviceType.Text = State["SelectedDeviceType"].ToString();
DB db = new DB();
StringBuilder b_sql = new StringBuilder("SELECT * FROM applications ");
b_sql.Append("WHERE application_name='" + State["SelectedApp"].ToString() + "'");
b_sql.Append(" AND customer_id='" + State["CustomerID"].ToString() + "'");
DataRow[] rows = db.ViziAppsExecuteSql(State, b_sql.ToString());
DataRow row = rows[0];
if (row["production_app_name"] != null)
ProductionAppName.Text = row["production_app_name"].ToString();
if (row["production_app_xml"] != DBNull.Value)
ProductionDesignExists.Visible = true;
else
ProductionDesignExists.Visible = false;
bool use_1_user_credential = false;
if (row["use_1_user_credential"] != DBNull.Value)
{
string use_1_cred = row["use_1_user_credential"].ToString();
use_1_user_credential = (use_1_cred.ToLower() == "true") ? true : false;
}
bool has_unlimited_users = false;
if (row["has_unlimited_users"] != DBNull.Value)
{
string has_unlimited = row["has_unlimited_users"].ToString();
has_unlimited_users = (has_unlimited.ToLower() == "true") ? true : false;
}
b_sql = new StringBuilder("SELECT * FROM branding_images ");
b_sql.Append("WHERE application_id='" + State["ApplicationID"].ToString() + "'");
rows = db.ViziAppsExecuteSql(State, b_sql.ToString());
foreach (DataRow image_row in rows)
{
if (image_row["type"].ToString() == "icon" && image_row["width"].ToString() == "512")
{
LargeIconButton.Visible = true;
DeleteIcon.Visible = true;
}
if (image_row["type"].ToString() == "splash")
{
ScreenSplashButton.Visible = true;
DeleteSplashImage.Visible = true;
}
}
db.CloseViziAppsDatabase(State);
}
}
catch (Exception ex)
{
util.ProcessMainExceptions(State, Response, ex);
}
}
示例13: 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 (!IsPostBack)
{
CopyRight.InnerText = HttpRuntime.Cache["CopyRight"].ToString();
UserLabel.Text = State["Username"].ToString();
}
if ( HttpRuntime.Cache["TechSupportEmail"] != null)
{
util.AddEmailToButton(SupportButton, HttpRuntime.Cache["TechSupportEmail"].ToString(), "Email To Tech Support");
}
util.UpdateSessionLog(State, "post", "ManageData");
State["DatabaseEvents"] = DatabaseEvents;
State["SpreadSheetEvents"] = SpreadSheetEvents;
State["WebServiceEvents"] = WebServiceEvents;
State["ManageDataApps"] = ManageDataApps;
ManageDataType.Attributes.Add("onclick", "checkChangingManageDataType(this);");
string attr = "javascript: NamedPopUp('Dialogs/Design/StoryBoard.aspx', 'StoryBoardPopup','height=900, width=460, left=0, top=400, menubar=no, status=no, location=no, toolbar=no, scrollbars=yes, resizable=yes');return false;";
ViewStoryBoard.Attributes.Add("onclick", attr);
ClearMessages();
if (DataMultiPage.SelectedIndex == 2)
return;
WebServiceEventMappingStatus.Attributes.Add("onclick", PopupHelper.GeneratePopupScript(
"Dialogs/ManageData/EventMappingStatus.aspx", 500, 500, false, false, false, true));
Init init = new Init();
if (State["ResetManageDataApps"] != null)
{
State["SelectedApp"] = null;
init.InitManageDataAppsList(State);
State["ResetManageDataApps"] = null;
}
if (ManageDataApps.Items.Count == 0 || ManageDataApps.SelectedValue.Contains("->"))
{
init.InitManageDataAppsList(State);
ManageDataType.Style.Value = "display:none";
ManageDataTypeLabel.Style.Value = "display:none";
ViewStoryBoard.Style.Value = "display:none";
ShouldRefreshStoryBoard.Text = "close";
ManageTypeMultiPage.SelectedIndex = Constants.BLANK_PAGE;
State["ManageDataType"] = null;
}
if (ManageDataApps.SelectedIndex > 0)
{
ViewStoryBoard.Style.Value = "";
ManageDataType.Style.Value = "";
ManageDataTypeLabel.Style.Value = "";
string target = Request.Form.Get("__EVENTTARGET");
if (target != "SaveDataRequestMap" &&
target != "SaveDataResponseMap" &&
target != "WebServiceResponseTreeView")
PrepareAppDisplay(target);
if (target == "ViewConnectionString")
{
DatabaseCommandsView.Nodes.Clear();
DatabaseEvents.SelectedIndex = 0;
SpreadsheetCommandsView.Nodes.Clear();
SpreadSheetEvents.SelectedIndex = 0;
}
}
}
catch (Exception ex)
{
util.ProcessMainExceptions(State, Response, ex);
}
}
示例14: InitAppsList
//Init the ComboBox with the specific check required for BillingHistory
private bool InitAppsList(Hashtable State, RadComboBox AppsList)
{
Util util = new Util();
try
{
if (AppsList == null)
return false;
//Get only paid_apps from paid_services table directly.
string sql = "SELECT app_name FROM paid_services WHERE customer_id='" + State["CustomerID"].ToString() + "' AND status='paid' AND sku != '" + HttpRuntime.Cache["iOSSubmitServiceSku"].ToString() + "' AND sku != '" + HttpRuntime.Cache["AndroidSubmitServiceSku"].ToString() + "' ORDER BY app_name";
//string sql = "SELECT app_name FROM paid_services WHERE customer_id='" + State["CustomerID"].ToString() + "' AND status='paid' ORDER BY app_name";
DB db = new DB();
DataRow[] rows = db.ViziAppsExecuteSql(State, sql);
AppsList.Items.Clear();
foreach (DataRow row in rows)
{
string app_name = row["app_name"].ToString();
AppsList.Items.Add(new RadComboBoxItem(app_name, app_name));
}
if (AppsList.IsEmpty)
return false;
AppsList.Items.Insert(0, new RadComboBoxItem("Select App ->", "Select App ->"));
AppsList.Items[0].Selected = true;
return true;
}
catch (Exception ex)
{
util.ProcessMainExceptions(State, Response, ex);
}
return false;
}
示例15: InitAppsList
// Modified from original viziapps code with the Additional Branded check so only valid ones are added to the ComboBox.
private bool InitAppsList(Hashtable State, RadComboBox AppsList)
{
Util util = new Util();
BillingUtil billingutil = new BillingUtil();
try
{
if (AppsList == null)
return false;
//string sql = "SELECT DISTINCT application_name FROM applications WHERE customer_id='" + State["CustomerID"].ToString() + "' ORDER BY application_name";
string sql = "SELECT DISTINCT application_name,application_type FROM applications WHERE customer_id='" + State["CustomerID"].ToString() + "' ORDER BY application_name";
DB db = new DB();
DataRow[] rows = db.ViziAppsExecuteSql(State, sql);
AppsList.Items.Clear();
foreach (DataRow row in rows)
{
string app_name = row["application_name"].ToString();
string app_type = row["application_type"].ToString();
//For native-hybrid apps do the branded check here inserting only Apps that have paid for branding.
if (app_type.Contains("native") || app_type.Contains("hybrid"))
{
//Inserting only Apps which meet all these criteria.
if ((billingutil.IsAppStoreSubmissionPaid(State, app_name) == true) && // + Submitted for App preparation.
(billingutil.IsAppPaid(State, app_name) == false)) // + not yet paid for any service
{
AppsList.Items.Add(new RadComboBoxItem(app_name, app_name));
}
}
else
{
//Inserting only Apps which meet all these criteria.
if (billingutil.IsAppPaid(State, app_name) == false) // not yet paid for any service
AppsList.Items.Add(new RadComboBoxItem(app_name, app_name));
}
}
if (AppsList.IsEmpty)
return false;
AppsList.Items.Insert(0, new RadComboBoxItem("Select App ->", "Select App ->"));
AppsList.Items[0].Selected = true;
return true;
}
catch (Exception ex)
{
util.ProcessMainExceptions(State, Response, ex);
}
return false;
}