public void DataBind()
        {
            _View.Message = string.Empty;
            int companyId = _IEmployeeFacade.GetEmployeeByAccountID(_LoginUser.Id).EmployeeDetails.Work.Company.DepartmentID;

            _View.Linkmans = _contactService.LoadSomeContactByName(CompanyConfig.SYSTEMID, 0, companyId, _View.ContactName).Linkmans;
        }
Пример #2
0
 private void view_SearchByName(string condition)
 {
     if (_view.IsCompany)
     {
         _view.CurrentContact = _contactService.LoadSomeContactByName(CompanyConfig.SYSTEMID, 0, _CompanyId,
                                                                      condition);
     }
     else
     {
         _view.CurrentContact = _contactService.LoadSomeContactByIndexKey(CompanyConfig.SYSTEMID, _view.UserId, 0,
                                                                          condition);
     }
 }
Пример #3
0
        public void LoadSomeContactByNameTest()
        {
            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.LoadSomeContactByName(testContact.SysNo, testContact.UserId, "li", false);

            Assert.AreEqual(1, getContact.Linkmans.Count);
            Assert.AreEqual(0, getContact.GetLinkmanById(testLinkmanId).Details.Count);
            Assert.AreEqual(testContact.Linkmans[1].Id, getContact.GetLinkmanById(testLinkmanId).Id);
            Assert.AreEqual("linkman2", getContact.GetLinkmanById(testLinkmanId).Name);
        }
        public void DataBind(Guid guid)
        {
            //获取登录员工公司id
            int     companyId = _IEmployeeFacade.GetEmployeeByAccountID(LoginUser.Id).EmployeeDetails.Work.Company.DepartmentID;
            Linkman linkman   = _contactService.LoadSomeContactByName(CompanyConfig.SYSTEMID, 0, companyId, string.Empty).GetLinkmanById(guid);

            _View.LinkManId   = linkman.Id;
            _View.LinkManName = linkman.Name;
            LinkmanDetail temp = linkman.GetLinkmanDetailByType(InfoType.Num_Mobile);

            _View.MobileNo = temp.Value;

            temp         = linkman.GetLinkmanDetailByType(InfoType.Addr_Home);
            _View.HomeNo = temp.Value;
            //ViewState["home"] = temp.Id;

            temp           = linkman.GetLinkmanDetailByType(InfoType.Addr_Work);
            _View.OfficeNo = temp.Value;
            //ViewState["work"] = temp.Id;

            temp            = linkman.GetLinkmanDetailByType(InfoType.Addr_Email);
            _View.EmailAddr = temp.Value;
            //ViewState["email"] = temp.Id;
        }