Ejemplo n.º 1
0
 public static void TestContacts()
 {
     Contact contact = new Contact();
     contact.Id = new Guid("8a50a750-ddfd-4d46-a1f1-7c5984e14b24");
     contact.Name = "Иванов Иван";
     contact.CreatedOn = DateTime.Now;
 }
Ejemplo n.º 2
0
        public static void OrmTest()
        {
            var ormProvider = ProcessingEngine.Instance.Container.Resolve<IOrmProvider>();

            Product product = new Product() { Name = "Name", ProductCode = 200 };

            Contact contact = new Contact();
            //contact.Id = new Guid("8a50a750-ddfd-4d46-a1f1-7c5984e14b24");
            contact.Id = Guid.NewGuid();
            contact.Name = "Яландаева Светлана";
            contact.CreatedOn = DateTime.Now;

            CardAccount cardAccount = new CardAccount();
            cardAccount.Id = new Guid("c9867a69-257c-4c96-b328-be2c79abab1a");
            cardAccount.Number = "100";
            cardAccount.CreatedOn = DateTime.Now;

            CardStatus cardStatus = new CardStatus();
            cardStatus.Id = new Guid("0af14853-9165-40ea-9c22-b1313a502353");
            cardStatus.Name = "Активирована";

            CardCategory cardCategory = new CardCategory();
            cardCategory.Id = Guid.NewGuid();
            cardCategory.Name = "VIP";

            CardType cardType1 = new CardType();
            cardType1.Id = new Guid("d7a79706-bf48-4bb3-84af-98f2d079acea");
            cardType1.Name = "Дисконтная";

            CardType cardType2 = new CardType();
            cardType2.Id = new Guid("58030dd7-8aa1-4738-89c5-66cc1ea7a2fb");
            cardType2.Name = "Бонусная";

            CardType cardType3 = new CardType();
            cardType3.Id = new Guid("fd498a9c-ac68-4c61-ad90-811d77d827d5");
            cardType3.Name = "Бонусно-дисконтная";

            Card card = new Card();
            card.ActivatedOn = DateTime.Now;
            card.CreatedOn = DateTime.Now;
            card.Id = new Guid("467123bf-9e01-41fa-a18c-0fa415962326");
            card.Number = "4256507090678123";
            card.ContactId = contact.Id;
            card.CardAccountId = cardAccount.Id;
            card.StatusId = cardStatus.Id;
            card.CategoryId = cardCategory.Id;
            card.TypeId = cardType3.Id;

            Purchase purchase = new Purchase();
            ProductInPurchase productInPurchase = new ProductInPurchase();

            //ormProvider.Products.SafeAdd(product);
            //ormProvider.Contacts.SafeAdd(contact);
            //ormProvider.CardAccounts.SafeAdd(cardAccount);
            //ormProvider.CardStatus.SafeAdd(cardStatus);
            //ormProvider.CardCategory.SafeAdd(cardCategory);
            //ormProvider.Cards.SafeAdd(card);
            //ormProvider.Purchases.SafeAdd(purchase);
            //ormProvider.ProductsInPurchase.SafeAdd(productInPurchase);
            //ormProvider.CardType.SafeAdd(cardType1);
            //ormProvider.CardType.SafeAdd(cardType2);
            //ormProvider.CardType.SafeAdd(cardType3);
        }