예제 #1
0
        public ClientCompanyDTO GetClientInfo(Guid clientID)
        {
            ClientCompanyDTO clientInfo = new ClientCompanyDTO();

            ClientPersons clientDB = _mng.GetClient(clientID);

            if (clientDB != null)
            {
                Companies companyDB = _mng.GetCompany(clientDB.companyID);
                if (companyDB != null)
                {
                    clientInfo.Id   = companyDB.id;
                    clientInfo.Name = companyDB.name;
                    IList <ClientCompanyPhoneDTO>    phoneList   = new List <ClientCompanyPhoneDTO>();
                    List <ClientPersonPhoneNumbbers> phoneListDB = _mng.GetClientPhonesList(clientID);
                    if (phoneListDB != null && phoneListDB.Count != 0)
                    {
                        foreach (var phone in phoneListDB)
                        {
                            phoneList.Add(new ClientCompanyPhoneDTO()
                            {
                                PhoneCode = phone.operatorCode, PhoneNumber = phone.phoneNum
                            });
                        }
                    }
                    clientInfo.ClientPersonsList = new List <ClientInfoDTO>();
                    clientInfo.ClientPersonsList.Add(new ClientInfoDTO()
                    {
                        Name              = clientDB.name,
                        Email             = clientDB.email,
                        CompanyPhonesList = phoneList
                    });
                }
            }
            return(clientInfo);
        }
예제 #2
0
 public void UpdateCompanyInfo(ClientCompanyDTO company)
 {
 }