当前位置: 首页>>代码示例>>C#>>正文


C# Util.GetAppID方法代码示例

本文整理汇总了C#中Util.GetAppID方法的典型用法代码示例。如果您正苦于以下问题:C# Util.GetAppID方法的具体用法?C# Util.GetAppID怎么用?C# Util.GetAppID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Util的用法示例。


在下文中一共展示了Util.GetAppID方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: 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; }

           State["ApplicationID"] = util.GetAppID((Hashtable)HttpRuntime.Cache[Session.SessionID]);
        LargeIcon.ImageUrl = util.GetApplicationLargeIcon(State, State["ApplicationID"].ToString());
    }
开发者ID:dcolonvizi,项目名称:ViziAppsPortal,代码行数:9,代码来源:LargeIcon.aspx.cs

示例2: UploadExcelFileButton_Click

    protected void UploadExcelFileButton_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 (this.FileUpload1.PostedFile != null)
        {
            // get the file
            HttpPostedFile file = this.FileUpload1.PostedFile;

            // check the length of the file
            if (file.ContentLength > 0)
            {
                string app_name =  ((Hashtable)HttpRuntime.Cache[Session.SessionID])["SelectedApp"].ToString();
                string application_id = util.GetAppID((Hashtable)HttpRuntime.Cache[Session.SessionID]);

                // get the Excel tables
                ExcelUtil excel_util = new ExcelUtil();
                DataTable[] excel_tables = excel_util.GetDataTablesFromExcelStream(file.InputStream);
                if (excel_tables == null || excel_tables.Length == 0)
                {
                    ErrorMessage.Text = "The file: '" + file.FileName + "' could not be processed as an Excel file.";
                    return;
                }

                 DataTable excel_table = excel_tables[0];
                 //string update_type = UploadType.SelectedIndex == 0 ? "add" : "replace";
                 string update_type =  "replace";

                //check on user limit
                 long max_users = util.GetMaxUsers((Hashtable)HttpRuntime.Cache[Session.SessionID]);
                if (max_users == 0 || max_users > 1000L)
                {
                    ErrorMessage.Text = "No paid ViziApps service allows any production credentials";
                    return;
                }

                if (excel_table.Rows.Count - 1 > max_users)
                {
                    ErrorMessage.Text = "The number of credentials in your Credentials File exceed the limit of the paid ViziApps service";
                    return;
                }

                StringBuilder errors = new StringBuilder("The file was successfully uploaded. Close this window.");

                util.UpdateUserCredentials((Hashtable)HttpRuntime.Cache[Session.SessionID], application_id, excel_table.Rows, update_type);

                ErrorMessage.Text = errors.ToString();
            }
            else
            {
                ErrorMessage.Text = "The file: '" + file.FileName + "' is empty.";
            }
        }
    }
开发者ID:dcolonvizi,项目名称:ViziAppsPortal,代码行数:56,代码来源:UploadUserCredentials.aspx.cs

示例3: LoadStoryBoard

    private void LoadStoryBoard()
    {
        Hashtable State = (Hashtable)HttpRuntime.Cache[Session.SessionID];
        Util util = new Util();
        try
        {
            State["PageViewAppID"] = util.GetAppID(State);

            XmlUtil x_util = new XmlUtil();
            XmlDocument doc = x_util.GetStagingAppXml(State);
            if (doc == null)
                return;

            PageTreeView.Nodes.Clear();
            string[] pages = x_util.GetAppPageNames(State, State["SelectedApp"].ToString());
            for (int i = 0; i < pages.Length; i++)
            {
                RadTreeNode page_node = new RadTreeNode();
                page_node.CssClass = "RadTreeView";
                page_node.Category = "page";
                page_node.PostBack = false;
                Control PageControl = LoadControl("Controls/PageView.ascx", pages[i]);
                page_node.Controls.Add(PageControl);
                PageTreeView.Nodes.Add(page_node);
            }
        }
        catch (Exception ex)
        {
            throw new Exception(ex.Message + ": " + ex.StackTrace);
        }
    }
开发者ID:dcolonvizi,项目名称:ViziAppsPortal,代码行数:31,代码来源:GoogleSpreadsheetOperations.aspx.cs

示例4: ApplicationInit

    private bool ApplicationInit(Hashtable State, RadComboBox AppsList, string AppID, string AppCGCustomerCode)
    {
        Util util = new Util();
        string app = AppsList.SelectedValue;

        if (app.Contains("->"))
            return false;

        State["SelectedApp"] = app;

        State["SelectedAppType"] = util.GetAppType(State);

        State["application_id"] = util.GetAppID(State);
        AppID = State["application_id"].ToString();

        BillingUtil billingutil = new BillingUtil();
        AppCGCustomerCode = billingutil.getAppPaidSKU(State);

        if (State["SelectedDeviceType"] == null)
        {
            State["SelectedDeviceView"] = State["SelectedDeviceType"] = Constants.IPHONE;
        }

        XmlUtil x_util = new XmlUtil();
        State["SelectedDeviceView"] = State["SelectedDeviceType"] = x_util.GetAppDeviceType(State);

        string username = State["Username"].ToString();
        State["customer_id"] = util.GetCustomerIDFromUsername(State, username);

        return true;
    }
开发者ID:dcolonvizi,项目名称:ViziAppsPortal,代码行数:31,代码来源:AppBrandingBilling.aspx.cs

示例5: 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 Web App Name: " +  State["SelectedApp"].ToString();

            if (util.IsAppStoreSubmissionPaid(State,  State["SelectedApp"].ToString()))
            {
                //SubmitForProvisioning.Visible = true;
                PurchaseButton.Visible = false;
             }
            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;
//.........这里部分代码省略.........
开发者ID:dcolonvizi,项目名称:ViziAppsPortal,代码行数:101,代码来源:PublishingFormWebApps.aspx.cs

示例6: GetWebApp

    public string GetWebApp(Hashtable State,XmlDocument xmlDoc, double x_size_factor,double y_size_factor )
    {
        try
        {
            XmlUtil x_util = new XmlUtil();
            Util util = new Util();
            DataSources DS = new DataSources();
            HtmlDocument htmlDoc = new HtmlDocument();

            //Load App Foundation
            StringBuilder NewWebAppHtml = new StringBuilder( HttpRuntime.Cache["NewWebAppHtml"].ToString());
            if (State["IsProduction"] == null)
                State["IsProduction"] = false;
            if ((bool)State["IsProduction"]== true)
            {
                string production_app_name = util.GetProductionAppName(State);
                NewWebAppHtml.Replace("CUSTOM_TITLE", production_app_name);
            }
            else
            {
                NewWebAppHtml.Replace("CUSTOM_TITLE", State["SelectedApp"].ToString());
            }

            /*if(false)
            {
                 NewWebAppHtml.Replace("ADDON_VIZIAPPS_SCRIPTS",  HttpRuntime.Cache["ShareThisScripts"].ToString());
            }
            else*/
                NewWebAppHtml.Replace("ADDON_VIZIAPPS_SCRIPTS", "");

                        //add custom header html
            NewWebAppHtml.Replace("CUSTOM_ACCOUNT_HEADER",util.GetCustomHeaderHTML(State));

            htmlDoc.LoadHtml(NewWebAppHtml.ToString());
            HtmlNode root = htmlDoc.DocumentNode;

            //Load Custom App Init
            StringBuilder customInitScript = new StringBuilder();
            string application_id = util.GetAppID(State);
            customInitScript.Append("var app_id = '" + application_id + "';\n");

            string app_time_stamp = null;
            if ((bool)State["IsProduction"] == false)
                app_time_stamp = util.GetStagingAppTimeStamp(State, application_id);
            else
                app_time_stamp = util.GetProductionAppTimeStamp(State, application_id);

            if (State["SelectedDeviceType"] == null)
                State["SelectedDeviceType"] = Constants.IPHONE;

            customInitScript.Append("\tvar app_time_stamp = '" + app_time_stamp + "';\n");
            customInitScript.Append("\tvar customer_id = '" + State["CustomerID"].ToString() + "';\n");
            customInitScript.Append("\tvar customer = '" + State["Username"].ToString() + "';\n");
            customInitScript.Append("\tvar app_name = '" + State["SelectedApp"].ToString() + "';\n");
            customInitScript.Append("\tvar design_device_type = '" + State["SelectedDeviceType"].ToString().ToLower() + "';\n");
            string viziapps_transition_type = null;
            if(State["PageTransitionType"] != null)
                viziapps_transition_type = State["PageTransitionType"].ToString();
            else
                 viziapps_transition_type ="slide";
            customInitScript.Append("\tvar viziapps_transition_type = '" + viziapps_transition_type + "';\n");

            switch (State["SelectedDeviceType"].ToString())
            {
                case Constants.IPHONE:
                case Constants.ANDROID_PHONE:
                default:
                    customInitScript.Append("\tvar ios_landscape_width_factor = " + Constants.IPHONE_LANDSCAPE_WIDTH_FACTOR + ";\n");
                    customInitScript.Append("\tvar ios_landscape_height_factor = " + Constants.IPHONE_LANDSCAPE_HEIGHT_FACTOR + ";\n");
                    customInitScript.Append("\tvar android_landscape_width_factor = " + Constants.ANDROID_PHONE_LANDSCAPE_WIDTH_FACTOR + ";\n");
                    customInitScript.Append("\tvar android_landscape_height_factor = " + Constants.ANDROID_PHONE_LANDSCAPE_HEIGHT_FACTOR + ";\n");
                    break;
                case Constants.ANDROID_TABLET:
                case Constants.IPAD:
                    customInitScript.Append("\tvar ios_landscape_width_factor = " + Constants.IPAD_LANDSCAPE_WIDTH_FACTOR + ";\n");
                    customInitScript.Append("\tvar ios_landscape_height_factor = " + Constants.IPAD_LANDSCAPE_HEIGHT_FACTOR + ";\n");
                    customInitScript.Append("\tvar android_landscape_width_factor = " + Constants.ANDROID_TABLET_LANDSCAPE_WIDTH_FACTOR + ";\n");
                    customInitScript.Append("\tvar android_landscape_height_factor = " + Constants.ANDROID_TABLET_LANDSCAPE_HEIGHT_FACTOR + ";\n");
                    break;
                }

            if((bool)State["IsProduction"])
                 customInitScript.Append("\tvar is_production = true;\n");
            else
                customInitScript.Append("\tvar is_production = false;\n");

            string device_type = x_util.GetAppDeviceType(State);
            if (device_type == Constants.IPAD || device_type == Constants.ANDROID_TABLET)
                customInitScript.Append("\tvar does_background_image_exist = false;\n");
            else
                customInitScript.Append("\tvar does_background_image_exist = true;\n");

            if (DS.DoesAppUseGoogleSpreadsheets(State))
            {
                customInitScript.Append("\tvar doesAppUseGoogleSpreadsheets = true;\n");
                customInitScript.Append("\tvar isGoogleDataLoaded = false;\n");
                customInitScript.Append("google.load('gdata', '2.x');\n");
                customInitScript.Append("google.setOnLoadCallback(onGoogleDataLoad);\n");
                customInitScript.Append("function onGoogleDataLoad() {isGoogleDataLoaded=true;}\n");
            }
//.........这里部分代码省略.........
开发者ID:dcolonvizi,项目名称:ViziAppsPortal,代码行数:101,代码来源:WebAppsUtil.cs

示例7: LoadStoryBoard

    private void LoadStoryBoard()
    {
        Hashtable State = (Hashtable)HttpRuntime.Cache[Session.SessionID];
        Util util = new Util();
        try
        {
            string app_id = null;
            PageTreeView.Nodes.Clear();
            if (State["SelectedApp"] == null || State["SelectedApp"].ToString().Contains("->"))
            {
                ExportDesign.Style.Value = "display:none";

                if (State["SelectedApp"] == null)
                {
                    string app  = Request.QueryString.Get("app");
                    if (app == null)
                        return;
                    State["CustomerID"] = Request.QueryString.Get("customerid");
                    State["SelectedApp"] = app;
                    app_id = util.GetAppIDFromAppName(State, app);
               }
                else
                    return;
            }
            if (app_id == null)
                app_id = util.GetAppID(State);

            ExportDesign.Style.Value = "";

            XmlUtil x_util = new XmlUtil();
            XmlDocument doc = x_util.GetStagingAppXml(State);
            if (doc == null)
                return;

            string[] pages = x_util.GetAppPageNames(State,  State["SelectedApp"].ToString());
            State["PageViewAppID"] = app_id;
            for (int i = 0; i < pages.Length; i++)
            {
                RadTreeNode page_node = new RadTreeNode();
                page_node.CssClass = "RadTreeView";
                page_node.Category = "page";
                page_node.PostBack = false;

                Control PageControl = LoadControl("../../Controls/PageView.ascx", pages[i]);
                page_node.Controls.Add(PageControl);
                PageTreeView.Nodes.Add(page_node);
            }
        }
        catch (Exception ex)
        {
            throw new Exception(ex.Message + ": " + ex.StackTrace);
        }
    }
开发者ID:dcolonvizi,项目名称:ViziAppsPortal,代码行数:53,代码来源:StoryBoard.aspx.cs

示例8: page_refresh

    private void page_refresh()
    {
        Util util = new Util();
        Hashtable State = (Hashtable)HttpRuntime.Cache[Session.SessionID];

        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:
                Web_SplashUploadLabel.Text = "Splash Image ( 768 X 1004 pixels from .jpg file )";
                Web_ScreenSplashButton.Attributes.Add("onclick", PopupHelper.GeneratePopupScript("../Dialogs/Publish/ScreenShot.aspx", 1004, 768, false, false, false, true));
                break;
            case Constants.ANDROID_TABLET:
                Web_SplashUploadLabel.Text = "Splash Image ( 800 X 1233 pixels from .jpg file )";
                Web_ScreenSplashButton.Attributes.Add("onclick", PopupHelper.GeneratePopupScript("../Dialogs/Publish/ScreenShot.aspx", 1233, 800, false, false, false, true));
                break;
            case Constants.IPHONE:
                Web_SplashUploadLabel.Text = "Splash Image ( 320 X 460 pixels from .jpg file )";
                Web_ScreenSplashButton.Attributes.Add("onclick", PopupHelper.GeneratePopupScript("../Dialogs/Publish/ScreenShot.aspx", 460, 320, false, false, false, true));
                break;
            case Constants.ANDROID_PHONE:
                Web_SplashUploadLabel.Text = "Splash Image ( 320 X 508 pixels from .jpg file )";
                Web_ScreenSplashButton.Attributes.Add("onclick", PopupHelper.GeneratePopupScript("../Dialogs/Publish/ScreenShot.aspx", 508, 320, false, false, false, true));
                break;
        }
        SelectedDeviceType.Text = State["SelectedDeviceType"].ToString();

        State["ApplicationID"] = util.GetAppID(State);

        if (State["SelectedAppType"].ToString().Contains("web"))
        {
            App.Text = "Test Web App Name: " + State["SelectedApp"].ToString();
            Web_SubmitPublishingForm.Visible = true;
            SubmitPublishingForm.Visible = false;
            SubmissionNotes.Visible = true;
            SubmissionNotesLabel.Visible = true;
        }

        else
        {
            App.Text = "Test Native/Hybrid App Name: " + State["SelectedApp"].ToString();
            SubmitPublishingForm.Visible = true;
            Web_SubmitPublishingForm.Visible = false;
            //Web_SubmissionNotes.Visible = true;
            //Web_SubmissionNotesLabel.Visible = true;
        }

        /*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();
//.........这里部分代码省略.........
开发者ID:dcolonvizi,项目名称:ViziAppsPortal,代码行数:101,代码来源:PublishingForm.aspx.cs

示例9: 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(
//.........这里部分代码省略.........
开发者ID:dcolonvizi,项目名称:ViziAppsPortal,代码行数:101,代码来源:PublishingForm.aspx.cs


注:本文中的Util.GetAppID方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。