Exemple #1
0
    public void SetAppType(Hashtable State, string app_type)
    {
        XmlUtil x_util = new XmlUtil();
        x_util.SetAppType(State, app_type);
        DB db = new DB();
        string sql = "SELECT application_type FROM applications WHERE application_name='" + State["SelectedApp"].ToString() + "' AND customer_id='" + State["CustomerID"].ToString() + "'";
        string previous_app_type = db.ViziAppsExecuteScalar(State, sql);
        if (previous_app_type != app_type)
        {
            if (app_type == Constants.WEB_APP_TYPE)
            {

                x_util.ConvertNativeAppToWebApp(State);
            }
            sql = "UPDATE applications SET application_type='" + app_type + "' WHERE application_name='" + State["SelectedApp"].ToString() + "' AND customer_id='" + State["CustomerID"].ToString() + "'";
            db.ViziAppsExecuteNonQuery(State, sql);
        }
        db.CloseViziAppsDatabase(State);
    }