public static string getAllShopsReport(Global global)
    {
        StringBuilder s = new StringBuilder();

        s.Append(HTML_TOOLBOX.newline());

        s.Append(HTML_TOOLBOX.div_START_input_container_TWITTER(10, 10, 5, 5, "cccccwidth:600px;cccccccheight:200px;"));

        bool bEnrolledAcceptedInTerminal      = true;
        List <backoffice.admin_shop> shopList = global.www_backoffice().get_all_shops(global.MASTER_CHAIN_ID, bEnrolledAcceptedInTerminal);

        s.Append(HTML_TOOLBOX.newline());
        s.Append(HTML_TOOLBOX.infobox_TWITTER("", "Rekruttering i terminal", 14, 300, 20, 10, 10, 10, 10, ""));
        s.Append(HTML_TOOLBOX.newline());

        foreach (backoffice.admin_shop shop in shopList)
        {
            s.Append("<div id=" + SHOP_UPDATE.getContainerId(shop) + " style='float:left;' >");
            s.Append(SHOP_UPDATE.A_get_minimized_dialog(shop));
            s.Append("</div>");
        }
        s.Append(HTML_TOOLBOX.div_END());

        s.Append(HTML_TOOLBOX.newline());
        s.Append(HTML_TOOLBOX.newline());

        bEnrolledAcceptedInTerminal = false;
        shopList = global.www_backoffice().get_all_shops(global.MASTER_CHAIN_ID, bEnrolledAcceptedInTerminal);
        s.Append(HTML_TOOLBOX.div_START_input_container_TWITTER(10, 10, 5, 5, "cccccwidth:600px;cccccccheight:200px;"));
        s.Append(HTML_TOOLBOX.newline());
        s.Append(HTML_TOOLBOX.infobox_TWITTER("", "Ingen rekruttering", 14, 300, 20, 10, 10, 10, 10, ""));
        s.Append(HTML_TOOLBOX.newline());

        foreach (backoffice.admin_shop shop in shopList)
        {
            s.Append("<div id=shop_container_" + shop.iId + " style='float:left;' >");
            s.Append(SHOP_UPDATE.A_get_minimized_dialog(shop));
            s.Append("</div>");
        }
        s.Append(HTML_TOOLBOX.div_END());

        return(s.ToString());
    }
    public static bool event_catched_and_performed(xAjax ajax, Global global)
    {
        bool bRetVal = true;

        string sProcedure = ajax.getProcedure();

        // ajax.WriteVariable("menu_2_click", sProcedure);

        if (sProcedure == "level_1_shop_menu()")
        {
            StringBuilder sb = new StringBuilder();

            sb.Append(global.chain_level_2_1(global));

            ajax.WriteHtml("menu_2", sb.ToString());
            // ajax.WriteHtml("work_page", sb.ToString());
        }

        else if (sProcedure == "level_2_update_show_all_shops()")
        {
            ajax.WriteHtml("work_page", SHOP_UPDATE.getAllShopsReport(global));
        }

        else if (sProcedure == "shop_update_show_shop()")
        {
            string sShopId             = ajax.getString("parameter_1");
            backoffice.admin_shop shop = global.www_backoffice().get_shop(sShopId);

            ajax.WriteHtml(SHOP_UPDATE.getContainerId(shop), SHOP_UPDATE.B_get_maximized_dialog(global, sShopId));
        }

        else if (sProcedure == "shop_update_close_shop()")
        {
            string sShopId             = ajax.getString("parameter_1");
            backoffice.admin_shop shop = global.www_backoffice().get_shop(sShopId);

            ajax.WriteHtml(SHOP_UPDATE.getContainerId(shop), SHOP_UPDATE.A_get_minimized_dialog(shop));
        }

        else if (sProcedure == "shop_update_enrollment_click()")
        {
            string sShopId             = ajax.getString("parameter_1");
            backoffice.admin_shop shop = global.www_backoffice().get_shop(sShopId);
            ajax.WriteHtml(SHOP_UPDATE.ENROLLMENT_UPDATE.getContainerId(shop), SHOP_UPDATE.ENROLLMENT_UPDATE.B_get_maximized_dialog(global, shop.iId.ToString()));
        }

        else if (sProcedure == "shop_update_enrollment_cancel()")
        {
            string sShopId = ajax.getString("parameter_1");

            backoffice.admin_shop shop = global.www_backoffice().get_shop(sShopId);

            string sEnrollmentContainerId = SHOP_UPDATE.ENROLLMENT_UPDATE.getContainerId(shop);

            ajax.WriteHtml(
                sEnrollmentContainerId,
                SHOP_UPDATE.ENROLLMENT_UPDATE.A_get_minimized_dialog(shop, false));
        }

        else if (sProcedure == "shop_update_enrollment_save()")
        {
            string sShopId           = ajax.getString("parameter_1");
            bool   bAcceptEnrollment = ajax.getBool("parameter_2");

            bool bOK = global.www_backoffice().update_shop_enrollment(sShopId, bAcceptEnrollment);

            backoffice.admin_shop shop = global.www_backoffice().get_shop(sShopId);

            string sEnrollmentContainerId = SHOP_UPDATE.ENROLLMENT_UPDATE.getContainerId(shop);

            ajax.WriteHtml(
                sEnrollmentContainerId,
                SHOP_UPDATE.ENROLLMENT_UPDATE.A_get_minimized_dialog(shop, false));
        }


        else if (sProcedure == "shop_update_enrollment_sms_click()")
        {
            string sShopId             = ajax.getString("parameter_1");
            backoffice.admin_shop shop = global.www_backoffice().get_shop(sShopId);
            ajax.WriteHtml(SHOP_UPDATE.ENROLLMENT_SMS_UPDATE.getContainerId(shop), SHOP_UPDATE.ENROLLMENT_SMS_UPDATE.B_get_maximized_dialog(global, shop.iId.ToString()));
        }

        else if (sProcedure == "shop_update_enrollment_sms_cancel()")
        {
            string sShopId = ajax.getString("parameter_1");

            backoffice.admin_shop shop = global.www_backoffice().get_shop(sShopId);

            string sEnrollmentContainerId = SHOP_UPDATE.ENROLLMENT_SMS_UPDATE.getContainerId(shop);

            ajax.WriteHtml(
                sEnrollmentContainerId,
                SHOP_UPDATE.ENROLLMENT_SMS_UPDATE.A_get_minimized_dialog(shop, false));
        }

        else if (sProcedure == "shop_update_enrollment_sms_save()")
        {
            string sShopId            = ajax.getString("parameter_1");
            string sSmsEnrollmentText = ajax.getString("parameter_2");

            bool bOK = global.www_backoffice().update_shop_enrollment_sms(sShopId, sSmsEnrollmentText);

            backoffice.admin_shop shop = global.www_backoffice().get_shop(sShopId);

            string sEnrollmentContainerId = SHOP_UPDATE.ENROLLMENT_SMS_UPDATE.getContainerId(shop);

            ajax.WriteHtml(
                sEnrollmentContainerId,
                SHOP_UPDATE.ENROLLMENT_SMS_UPDATE.A_get_minimized_dialog(shop, false));
        }



        else if (sProcedure == "shop_update_merchant_id_click()")
        {
            string sShopId             = ajax.getString("parameter_1");
            backoffice.admin_shop shop = global.www_backoffice().get_shop(sShopId);

            ajax.WriteHtml(SHOP_UPDATE.MERCHANT_UPDATE.getContainerId(shop), SHOP_UPDATE.MERCHANT_UPDATE.B_get_maximized_dialog(global, shop.iId.ToString()));
        }

        else if (sProcedure == "shop_update_merchant_id_save()")
        {
            string sShopId = ajax.getString("parameter_1");
            string sNewBax = ajax.getString("parameter_2");

            if (!SHOP_UPDATE.isBlank(sNewBax))
            {
                bool bOK = global.www_backoffice().update_shop_merchant_id(sShopId, sNewBax);
            }

            backoffice.admin_shop shop = global.www_backoffice().get_shop(sShopId);

            string sMerchantContainerId = SHOP_UPDATE.MERCHANT_UPDATE.getContainerId(shop);

            ajax.WriteHtml(
                sMerchantContainerId,
                SHOP_UPDATE.MERCHANT_UPDATE.A_get_minimized_dialog(shop, false));
        }

        else if (sProcedure == "shop_update_merchant_id_cancel()")
        {
            string sShopId = ajax.getString("parameter_1");

            backoffice.admin_shop shop = global.www_backoffice().get_shop(sShopId);

            string sMerchantContainerId = SHOP_UPDATE.MERCHANT_UPDATE.getContainerId(shop);

            ajax.WriteHtml(
                sMerchantContainerId,
                SHOP_UPDATE.MERCHANT_UPDATE.A_get_minimized_dialog(shop, false));
            return(true);
        }
        else
        {
            bRetVal = false;
        }

        return(bRetVal);
    }