Пример #1
0
        public static CheckoutRow MakeFake(GDID gdid)
        {
            var ch = new CheckoutRow()
            {
                ID          = gdid,
                Customer    = PersonRow.MakeFake(gdid),
                FileName    = "myface_" + gdid.ID.ToString(),
                Date        = DateTime.Now,
                StartOffset = gdid.ID * 20,
                G_Block     = gdid,

                Address1 = NFX.Parsing.NaturalTextGenerator.GenerateAddressLine(),
                Address2 = (gdid.ID % 7) == 0 ? NFX.Parsing.NaturalTextGenerator.GenerateAddressLine() : null
            };

            var chCnt = (int)(gdid.ID % 10);

            ch.Charges = new ChargeRow[chCnt];

            for (int i = 0; i < chCnt; i++)
            {
                ch.Charges[i] = ChargeRow.MakeFake(gdid);
            }

            return(ch);
        }
Пример #2
0
        public static PurchaseRow MakeFake(GDID gdid)
        {
            var purch = new PurchaseRow()
            {
                ID          = gdid,
                Customer    = PersonRow.MakeFake(gdid),
                Date        = DateTime.Now,
                Amount      = new Amount("usd", gdid.ID % 1897),
                SalesPerson = (gdid.ID % 2) == 0 ? null : PersonRow.MakeFake(gdid),
                G_Product   = new GDID(0, gdid.ID + 157)
            };

            return(purch);
        }