Exemple #1
0
 private void view_SearchByIndexKey(string condition)
 {
     if (_view.IsCompany)
     {
         _view.CurrentContact = _contactService.LoadSomeContactByIndexKey(CompanyConfig.SYSTEMID, 0, _CompanyId,
                                                                          condition);
     }
     else
     {
         _view.CurrentContact = _contactService.LoadSomeContactByIndexKey(CompanyConfig.SYSTEMID, _view.UserId, 0,
                                                                          condition);
     }
 }
Exemple #2
0
        public void LoadSomeContactByIndexKeyTest()
        {
            Contact testContact = CreateTestContact();

            contactServices.SaveLinkman(testContact.SysNo, testContact.UserId, testContact.Linkmans[1]);

            Guid testLinkmanId = testContact.Linkmans[1].Id;

            _LinkMans.Add(testContact.Linkmans[1]);

            Contact getContact = contactServices.LoadSomeContactByIndexKey(testContact.SysNo, testContact.UserId, "L", false);

            Assert.AreEqual(testContact.Linkmans[1].Id, getContact.GetLinkmanById(testLinkmanId).Id);
            Assert.AreEqual(0, getContact.GetLinkmanById(testLinkmanId).Details.Count);
            Assert.AreEqual("linkman2", getContact.GetLinkmanById(testLinkmanId).Name);
            Assert.AreEqual("L", getContact.GetLinkmanById(testLinkmanId).IndexKey);
        }