本文整理汇总了C#中Util.SetUnlimitedUsers方法的典型用法代码示例。如果您正苦于以下问题:C# Util.SetUnlimitedUsers方法的具体用法?C# Util.SetUnlimitedUsers怎么用?C# Util.SetUnlimitedUsers使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Util
的用法示例。
在下文中一共展示了Util.SetUnlimitedUsers方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: page_refresh
//.........这里部分代码省略.........
/*if (util.IsAppStoreSubmissionPaid(State, State["SelectedApp"].ToString()))
{*/
/*SubmissionNotes.Visible = true;
SubmissionNotesLabel.Visible = true;*/
//PurchaseButton.Visible = false;
/*}
else
{
SubmitForProvisioning.Visible = false;
SubmissionNotes.Visible = false;
SubmissionNotesLabel.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));
}*/
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());
if (rows.Length > 0)
{
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);
}
}
}
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);
}
示例2: 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; }
try
{
ClearMessages();
State["ApplicationID"] = util.GetAppID(State);
App.Text = "Test Native App Name: " + State["SelectedApp"].ToString();
if (util.IsAppStoreSubmissionPaid(State, State["SelectedApp"].ToString()))
{
SubmitForProvisioning.Visible = true;
SubmissionNotes.Visible = true;
SubmissionNotesLabel.Visible = true;
PurchaseButton.Visible = false;
}
else
{
SubmitForProvisioning.Visible = false;
SubmissionNotes.Visible = false;
SubmissionNotesLabel.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)
{
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(
//.........这里部分代码省略.........