Example #1
0
        public IList <ClientReadDto> FindByUser(int id)
        {
            IList <ClientReadDto> listDto = new List <ClientReadDto>();

            clientDao = new ClientsDao();
            IList <Clients> listC = clientDao.FindByUser(id);

            foreach (Clients c in listC)
            {
                listDto.Add(new ClientReadDto(c.ID, c.Name, c.Address, c.Phone, c.CreatedDate));
            }

            return(listDto);
        }
Example #2
0
 public bool Update(ClientUpdateDto clientDto)
 {
     clientDao = new ClientsDao();
     return(clientDao.Update(new Clients(clientDto.ID, clientDto.Name, clientDto.Address, clientDto.Phone, clientDto.UserId, clientDto.CreateDate)));
 }
Example #3
0
 public bool Create(ClientCreateDto clientDto)
 {
     clientDao = new ClientsDao();
     return(clientDao.Save(new Clients(clientDto.Name, clientDto.Address, clientDto.Phone, clientDto.UserId)));
 }