// Produces a minimized dashboard report ...
    public static string A_get_minimized_dialog(backoffice.SHOP_ITEM chain)
    {
        StringBuilder sb = new StringBuilder();

        sb.Append("<div class=chain_container_header onclick=select_chains_available()>" + chain.sName + "</div>");

        return sb.ToString();
    }
 public static string A_get_minimized_dialog(backoffice.admin_shop shop)
 {
     return
         HTML_TOOLBOX.infobox_TWITTER_clickable(
         "", "shop_report_show_shop('" + shop.iId.ToString() + "')",
         shop.sName,
         "Klikk for å se detaljer",
         14, 200, 50, 10, 10, 10, 10, "cursor:pointer;font-weight:bold;");
 }
        public static string A_get_minimized_dialog(backoffice.admin_shop shop, bool bIncludeContainerWrap)
        {
            StringBuilder sb = new StringBuilder();

            if (bIncludeContainerWrap)
                sb.Append("<div style='float:left;' id=" + getContainerId(shop) + " >");

            string sLabel = "BAX-ID";
            string sOldValue = shop.sMerchantId;
            string sJavascriptFunction = "shop_update_merchant_id_click('" + shop.iId.ToString() + "')";

            sb.Append(HTML_TOOLBOX.get_text_input_minimized(sLabel, sOldValue, sJavascriptFunction));

            if (bIncludeContainerWrap)
                sb.Append("</div>");

            return sb.ToString();
        }
        public static string A_get_minimized_dialog(backoffice.admin_shop shop, bool bIncludeContainerWrap)
        {
            StringBuilder sb = new StringBuilder();

            if (bIncludeContainerWrap)
                sb.Append("<div style='float:left;' id=" + getContainerId(shop) + " >");

            string sLabel = "Aksepter enrollment i terminalen";
            bool bOldValue = shop.bAcceptTerminalEnrollment;
            string sJavascriptFunction = "shop_report_enrollment_click('" + shop.iId.ToString() + "')";

            sb.Append(HTML_TOOLBOX.get_checkbox_input_minimized(sLabel, bOldValue, sJavascriptFunction));

            if (bIncludeContainerWrap)
                sb.Append("</div>");

            return sb.ToString();
        }
 public static string getContainerId(backoffice.admin_shop shop)
 {
     return "enrollment_container_" + shop.iId.ToString();
 }
    public static string add_SVG_gRelationsFromBasketToAcceptMembership(backoffice.admin_shop shop)
    {
        StringBuilder s = new StringBuilder();
        backoffice.shop_event rightLooper = shop.firstShopEvent;
        while (rightLooper != null)
        {
            // a) We can have more than one terminal, so we have to search to the end ...
            // b) Membership can have been accepted earlier so we start even before the basket
            backoffice.shop_event anchorLooper = shop.firstShopEvent;
            while (anchorLooper != null)
            {
                if (anchorLooper != rightLooper) // Don't relate to yourself ...
                {
                    if (anchorLooper.sToken == rightLooper.sToken)
                    {
                        if ((rightLooper.shopEventType == backoffice.SHOP_EVENT_TYPE.B_BASKET_CONFIRMED || rightLooper.shopEventType == backoffice.SHOP_EVENT_TYPE.B_BASKET_NOT_CONFIRMED) &&
                                anchorLooper.shopEventType == backoffice.SHOP_EVENT_TYPE.C_MEMBERSHIP_ACCEPTED)
                                // && rightLooper.higherPointer == null)
                        {
                            rightLooper.higherPointer = anchorLooper;
                            s.Append(
                               "<line " +
                               " x1=" + rightLooper.xCenter.ToString() + " y1=" + rightLooper.yCenter +
                               " x2=" + anchorLooper.xCenter.ToString() + " y2=" + anchorLooper.yCenter.ToString() + " style='stroke:rgb(180,180,180);stroke-width:2' />");
                        }
                    }
                }
                anchorLooper = anchorLooper.Next;
            }

            rightLooper = rightLooper.Next;
        }
        return s.ToString();
    }
    public static string add_SVG_gRelationsFromCardInsertToBasket(backoffice.admin_shop shop)
    {
        StringBuilder s = new StringBuilder();
        backoffice.shop_event rightLooper = shop.firstShopEvent;
        while (rightLooper != null)
        {
            /* 
            A_PHONE_ENROLLED, 
                B_BASKET_NOT_CONFIRMED, 
                B_BASKET_CONFIRMED, 
                *C_MEMBERSHIP_ACCEPTED, 
                 
            A_PHONE_ALREADY_MEMBER, Can be a 2 or a 1
                B_BASKET_NOT_CONFIRMED, 
                B_BASKET_CONFIRMED, 
                *C_MEMBERSHIP_ACCEPTED, 

             A_PHONE_SKIPPED, 
                END

            B_BASKET_CONFIRMED,                 
                *C_MEMBERSHIP_ACCEPTED, 

            B_BASKET_NOT_CONFIRMED,                 
                *C_MEMBERSHIP_ACCEPTED, 
                 
             C_MEMBERSHIP_ACCEPTED, 
                END
             */

            // We can have more than one terminal, so we have to search to the end ...

            backoffice.shop_event anchorLooper = rightLooper.Next;
            while (anchorLooper != null)
            {
                if (rightLooper.sToken.IndexOf(anchorLooper.sToken) >= 0)
                {
                    if ((rightLooper.shopEventType == backoffice.SHOP_EVENT_TYPE.A_PHONE_ENROLLED || rightLooper.shopEventType == backoffice.SHOP_EVENT_TYPE.A_CONSUMER_EXISTS || rightLooper.shopEventType == backoffice.SHOP_EVENT_TYPE.A_CONSUMER_EXISTS_AND_IS_MEMBER || rightLooper.shopEventType == backoffice.SHOP_EVENT_TYPE.A_PHONE_SKIPPED) &&
                        (
                            anchorLooper.shopEventType == backoffice.SHOP_EVENT_TYPE.B_BASKET_CONFIRMED ||
                            anchorLooper.shopEventType == backoffice.SHOP_EVENT_TYPE.B_BASKET_NOT_CONFIRMED)
                         && rightLooper.higherPointer == null)
                    {
                        rightLooper.higherPointer = anchorLooper;
                        s.Append(
                           "<line " +
                           " x1=" + rightLooper.xCenter.ToString() + " y1=" + rightLooper.yCenter +
                           " x2=" + anchorLooper.xCenter.ToString() + " y2=" + anchorLooper.yCenter.ToString() + " style='stroke:rgb(255,255,255);stroke-width:1' />");
                        break;
                    }
                }
                anchorLooper = anchorLooper.Next;
            }

            rightLooper = rightLooper.Next;
        }
        return s.ToString();
    }