Exemplo n.º 1
0
        public static List<BuyerBilling> GetBuyerBillings()
        {
            List<BuyerBilling> buyerBillings = new List<BuyerBilling>();

            Billing billing = new Billing();
            billing.BuyerId = 1;
            billing.BillingTypeId = 1;
            billing.BillingId = 1;
            billing.SellerId = 1;
            billing.Value = (decimal) 0.50;

             Buyer buyer1 = new Buyer();
            buyer1.Active = true;
            buyer1.Alias = "FAKE";
            buyer1.RefKey = "FAKE";
            buyer1.BuyerId = 1;
            buyer1.Country = "UK";
            buyer1.EmailAddress = "*****@*****.**";
            buyer1.FixedAmount = 12;
            buyer1.IntegrationUrl = "Http://whatever.com/ApplyLead?lala";

            List<Billing> billings = new List<Billing>();
            billings.Add(billing);

            BuyerBilling buyerBilling = new BuyerBilling();
            buyerBilling.Billing = billing;
            buyerBilling.Buyer = buyer1;

            buyerBillings.Add(buyerBilling);

            return buyerBillings;
        }
Exemplo n.º 2
0
 partial void DeleteBuyer(Buyer instance);
Exemplo n.º 3
0
 partial void UpdateBuyer(Buyer instance);
Exemplo n.º 4
0
 partial void InsertBuyer(Buyer instance);
Exemplo n.º 5
0
        public static List<Buyer> GetBuyers()
        {
            List<Buyer> buyers = new List<Buyer>();

            Buyer buyer1 = new Buyer();
            buyer1.Active = true;
            buyer1.Alias = "FAKE";
            buyer1.RefKey = "FAKE";
            buyer1.BuyerId = 1;
            buyer1.Country = "UK";
            buyer1.EmailAddress = "*****@*****.**";
            buyer1.FixedAmount = 12;
            buyer1.IntegrationUrl = "Http://whatever.com/ApplyLead?lala";

            //Buyer buyer2 = new Buyer();
            //buyer2.Active = true;
            //buyer2.Alias = "CreditoMais";
            //buyer2.BuyerId = 2;
            //buyer2.Country = "UK";
            //buyer2.EmailAddress = "*****@*****.**";
            //buyer2.FixedAmount = 11;
            //buyer2.IntegrationUrl = "Http://whatever.com/ApplyLead?lala";

            //Buyer buyer3 = new Buyer();
            //buyer3.Active = true;
            //buyer3.Alias = "PdbUk";
            //buyer3.BuyerId = 3;
            //buyer3.Country = "UK";
            //buyer3.EmailAddress = "*****@*****.**";
            //buyer3.FixedAmount = 15;
            //buyer3.IntegrationUrl = "Http://whatever.com/pdbuk/ApplyLead?lala";

            //Buyer buyer4 = new Buyer();
            //buyer4.Active = true;
            //buyer4.Alias = "LeadGen";
            //buyer4.BuyerId = 4;
            //buyer4.Country = "UK";
            //buyer4.EmailAddress = "*****@*****.**";
            //buyer4.FixedAmount = 9;
            //buyer4.IntegrationUrl = "Http://whatever.com/ApplyLead?lala";

            //Buyer buyer5 = new Buyer();
            //buyer5.Active = true;
            //buyer5.Alias = "PingTree";
            //buyer5.BuyerId = 5;
            //buyer5.Country = "UK";
            //buyer5.EmailAddress = "*****@*****.**";
            //buyer5.FixedAmount = 50;
            //buyer5.IntegrationUrl = "Http://whatever.com/ApplyLead?lala";

            //Buyer buyer6 = new Buyer();
            //buyer6.Active = true;
            //buyer6.Alias = "WageDay";
            //buyer6.BuyerId = 6;
            //buyer6.Country = "UK";
            //buyer6.EmailAddress = "*****@*****.**";
            //buyer6.FixedAmount = 25;
            //buyer6.IntegrationUrl = "Http://whatever.com/WageDay/ApplyLead?lala";

            buyers.Add(buyer1);
            //buyers.Add(buyer2);
            //buyers.Add(buyer3);
            //buyers.Add(buyer4);
            //buyers.Add(buyer5);
            //buyers.Add(buyer6);

            return buyers.OrderByDescending(a => a.FixedAmount).ToList();
        }
        public void Insert2Success1RejectedBuyers()
        {
            //Insert Seller
            using (BeginScope())
            {
                EprospectsDataContext context = Resolve<EprospectsDataContext>();

                Seller seller = new Seller();

                seller.Active = true;
                seller.Country = "UK";
                seller.SellerName = "GetCashNow";

                context.Sellers.InsertOnSubmit(seller);
                context.SubmitChanges();
                _sellerId = seller.SellerId;
            }

            //Insert Buyers
            using (BeginScope())
            {
                EprospectsDataContext context = Resolve<EprospectsDataContext>();
                Buyer buyer1 = new Buyer();
                buyer1.Active = true;
                buyer1.Alias = "FAKE1";
                buyer1.Country = "UK";
                buyer1.EmailAddress = "*****@*****.**";
                buyer1.FixedAmount = 5;
                buyer1.IntegrationUrl = "fakesuccess.com";
                buyer1.Mobile = "0787788878783";
                buyer1.Name = "FAKE1";
                buyer1.RefKey = "FAKE";
                buyer1.Username = "******";
                buyer1.Password = "******";

                context.Buyers.InsertOnSubmit(buyer1);

                Buyer buyer2 = new Buyer();
                buyer2.Active = true;
                buyer2.Alias = "FAKE2";
                buyer2.Country = "UK";
                buyer2.EmailAddress = "*****@*****.**";
                buyer2.FixedAmount = 10;
                buyer2.IntegrationUrl = "fakesuccess.com";
                buyer2.Mobile = "0787788878783";
                buyer2.Name = "FAKE2";
                buyer2.RefKey = "FAKE";
                buyer2.Username = "******";
                buyer2.Password = "******";

                context.Buyers.InsertOnSubmit(buyer2);

                Buyer buyer3 = new Buyer();
                buyer3.Active = true;
                buyer3.Alias = "FAKE3";
                buyer3.Country = "UK";
                buyer3.EmailAddress = "*****@*****.**";
                buyer3.FixedAmount = 15;
                buyer3.IntegrationUrl = "fakerejected.com";
                buyer3.Mobile = "0787788878783";
                buyer3.Name = "FAKE3";
                buyer3.RefKey = "FAKE";
                buyer3.Username = "******";
                buyer3.Password = "******";

                context.Buyers.InsertOnSubmit(buyer3);

                context.SubmitChanges();

                _buyer1Id = buyer1.BuyerId;
                _buyer2Id = buyer2.BuyerId;
                _buyer3Id = buyer3.BuyerId;

            }
            //Insert Billings
            using (BeginScope())
            {
                EprospectsDataContext context = Resolve<EprospectsDataContext>();

                Billing billing1 = new Billing();
                billing1.BillingTypeId = 1;
                billing1.BuyerId = _buyer1Id;
                billing1.SellerId = _sellerId;
                billing1.Value = 1;

                context.Billings.InsertOnSubmit(billing1);

                Billing billing2 = new Billing();
                billing2.BillingTypeId = 2;
                billing2.BuyerId = _buyer2Id;
                billing2.SellerId = _sellerId;
                billing2.Value = 1;

                context.Billings.InsertOnSubmit(billing2);

                Billing billing3 = new Billing();
                billing3.BillingTypeId = 2;
                billing3.BuyerId = _buyer3Id;
                billing3.SellerId = _sellerId;
                billing3.Value = 1;

                context.Billings.InsertOnSubmit(billing3);

                context.SubmitChanges();
            }
        }