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


C# Util.IsFreeProductionValid方法代码示例

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


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

示例1: InitAppsList

    // Modified from original viziapps code with the Additional paid check so only valid ones are added to the ComboBox.
    private bool InitAppsList(Hashtable State, RadComboBox AppsList)
    {
        Util util = new Util();
        try
        {
            if ((AppsList == null) || (State["CustomerID"] == null))
                return false;

            string sql = "SELECT DISTINCT application_name,application_id 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 application_id = row["application_id"].ToString();

                //if (util.IsAppStoreSubmissionPaid(State, app_name) == false)

                //Inserting only Apps not done submitting the Publishing Form
                if(util.IsFreeProductionValid(State, application_id) == false)
                {
                    AppsList.Items.Add(new RadComboBoxItem(app_name, app_name));

                }//End paid check

            }

            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;
    }
开发者ID:dcolonvizi,项目名称:ViziAppsPortal,代码行数:44,代码来源:PublishingForm.aspx.cs

示例2: InitAppsList

    // Modified from original viziapps code with the additional checks so only valid ones are added to the ComboBox.
    private bool InitAppsList(Hashtable State, RadComboBox AppsList)
    {
        Util util = new Util();
        try
        {

            if (AppsList == null)
                return false;

           // string sql = "SELECT DISTINCT application_name FROM applications WHERE customer_id='" + State["CustomerID"].ToString() + "' ORDER BY application_name";

            //Get only native Apps to load onto this ComboBox.
            string sql = "SELECT DISTINCT application_name,application_id FROM applications WHERE customer_id='" + State["CustomerID"].ToString() + "' AND application_type <> 'web'" + " 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 application_id = row["application_id"].ToString();

                BillingUtil billingutil = new BillingUtil();

                                                                                                //Inserting only Apps which meet all these criteria.
                if ((billingutil.IsAppStoreSubmissionPaid(State, app_name) == false) &&          // + never submitted for App preparation as yet.
                     (billingutil.IsAppPaid(State, app_name) == false) &&                       // + not yet paid for anything
                     (util.IsFreeProductionValid(State, application_id) == true) &&             // + completed the Production Form Submission
                     (billingutil.IsAppCancelled(State, app_name) == false))                    // + never cancelled 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;
    }
开发者ID:dcolonvizi,项目名称:ViziAppsPortal,代码行数:50,代码来源:AppBrandingBilling.aspx.cs

示例3: Report

    public string Report(string app_id, string customer_id, string is_production)
    {
        Init init = new Init();
        Hashtable State = (Hashtable)HttpRuntime.Cache[Session.SessionID];
        init.InitSkuConfigurations(State);
        Util util = new Util();
        XmlUtil x_util = new XmlUtil();
        XmlNode status_node = null;
        XmlDocument Report = new XmlDocument();
        XmlNode root = Report.CreateElement("mobiflex_report");
        Report.AppendChild(root);
        string xml_prefix = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>";
        try
        {
            DB db = new DB();

            if (is_production == "yes")
            {
                //is payment current
                Hashtable features = util.IsProductionAppPaid(State, app_id);
                if (features == null)
                {
                    if (!util.IsFreeProductionValid(State, app_id))
                    {
                        x_util.CreateNode(Report, root, "status", "kill");
                        x_util.CreateNode(Report, root, "status_message", "The account for this app is inactive. Contact ViziApps to re-activate your account.");
                        return (xml_prefix + Report.OuterXml);
                    }
                }
            }

            if (customer_id != null && customer_id.Length > 0)
            {
                 State["CustomerID"] = customer_id;
                string active_sql = "SELECT COUNT(*) FROM customers where customer_id='" + customer_id + "' AND status!='inactive'";
                string active_count = db.ViziAppsExecuteScalar(State, active_sql);
                if (active_count == "0")
                {
                    x_util.CreateNode(Report, root, "status", "kill");
                    x_util.CreateNode(Report, root, "status_message", "The account for this app is inactive. Contact ViziApps to re-activate your account.");
                    return (xml_prefix + Report.OuterXml);
                }
            }

            string status = "OK";

            status_node = x_util.CreateNode(Report, root, "status", status);
        }
        catch (System.Exception SE)
        {
            util.LogError(State, SE);
            if (status_node == null)
            {
                Report = new XmlDocument();
                XmlNode root2 = Report.CreateElement("app_project");
                Report.AppendChild(root2);
                status_node = x_util.CreateNode(Report, root2, "status");

            }
            status_node.InnerText = SE.Message + ": " + SE.StackTrace;
        }

        return (xml_prefix + Report.OuterXml);
    }
开发者ID:dcolonvizi,项目名称:ViziAppsPortal,代码行数:64,代码来源:WebAppService.aspx.cs


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