public EcmScheda(AmazonOrder.Order o, bool amazon, string cat)
        {
            this.spedizione    = o.ShipmentServiceLevelCategory;
            this.tipoAcquisto  = o.canaleOrdine;
            this.compratore    = o.buyer;
            this.address       = o.destinatario;
            this.canaleVendita = o.canaleVendita;

            this.cat_scheda = cat;
            this.dataOrdine = o.dataUltimaMod;
            this.isAmazon   = amazon;
        }
Esempio n. 2
0
    private List <AmazonOrder.ShippingAddress[][]> MakeGridAddress(AmzIFace.AmazonInvoice.PaperLabel pl)
    {
        List <AmazonOrder.ShippingAddress> indirizzi = ((ArrayList)Session["addresses"]).Cast <AmazonOrder.ShippingAddress>().ToList();
        int forPage  = pl.rows * pl.cols;
        int numpages = ((indirizzi.Count % forPage) == 0) ? indirizzi.Count / forPage : (indirizzi.Count / forPage) + 1;

        List <AmazonOrder.ShippingAddress[][]> document = new List <AmazonOrder.ShippingAddress[][]>();

        AmazonOrder.ShippingAddress[][] page;

        int count = 0;

        for (int p = 0; p < numpages; p++)
        {
            if (count >= indirizzi.Count)
            {
                break;
            }

            page = new AmazonOrder.ShippingAddress[pl.rows][];
            for (int r = 0; r < pl.rows; r++)
            {
                if (count >= indirizzi.Count)
                {
                    break;
                }

                page[r] = new AmazonOrder.ShippingAddress[pl.cols];
                for (int c = 0; c < pl.cols; c++)
                {
                    if (count >= indirizzi.Count)
                    {
                        break;
                    }
                    page[r][c] = indirizzi[count];

                    count++;
                }
            }
            document.Add(page);
        }
        return(document);
    }