Exemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        public override OperationDTO GetById(int Id)
        {
            try
            {
                OperationTableAdapter.Fill(OperationDataTable);
                BorrowNlendDataSet.OperationRow operationRow = OperationDataTable.First(opRow => opRow.ID == Id);

                OperationDTO operationDTO = new OperationDTO()
                {
                    ID     = operationRow.ID,
                    Amount = operationRow.Amount,
                    Type   = (OperationType)operationRow.Type,
                    Person = PersonDAO.Instance.GetById(operationRow.Person_ID)
                };

                return(operationDTO);
            }
            catch (Exception)
            {
                throw;
            }
        }