public void SearchPayers(string searchPattern)
 {
     if (String.IsNullOrEmpty(searchPattern))
     {
         return;
     }
     PropertyBag["payers"] = Payer.GetLikeAvaliable(DbSession, searchPattern);
     CancelLayout();
 }
Exemplo n.º 2
0
        public void Search_payer()
        {
            var client = DataMother.TestClient();
            var payer  = client.Payers.First();

            payer.ShortName = String.Format("Тестовый плательщик {0}", payer.Id);
            session.Save(payer);
            session.Flush();

            var payers = Payer.GetLikeAvaliable(session, payer.ShortName);

            Assert.That(payers.Count(), Is.EqualTo(1));
            Assert.That(payers.Single().Id, Is.EqualTo(payer.Id));
        }
Exemplo n.º 3
0
        public void Search_payet_with_supplier()
        {
            var supplier = DataMother.CreateSupplier();

            Save(supplier);
            var payer = supplier.Payer;

            payer.ShortName = String.Format("Тестовый плательщик {0}", payer.Id);
            Save(payer);
            Flush();

            var payers = Payer.GetLikeAvaliable(session, payer.ShortName);

            Assert.That(payers.Count(), Is.EqualTo(1));
            Assert.That(payers.Single().Id, Is.EqualTo(payer.Id));
        }