public ResponseBo <List <PersonRelationFindListBo> > GetFindList(PersonRelationFindGetListCriteriaBo criteriaBo)
        {
            ResponseBo <List <PersonRelationFindListBo> > responseBo = new ResponseBo <List <PersonRelationFindListBo> >();

            try
            {
                using (SqlConnection conn = DbAccess.Connection.GetConn())
                {
                    var p = new DynamicParameters();
                    p.Add("@Message", dbType: DbType.String, direction: ParameterDirection.Output, size: 255);
                    p.Add("@IsSuccess", dbType: DbType.Boolean, direction: ParameterDirection.Output);

                    p.Add("@ParentPersonId", criteriaBo.ParentPersonId, DbType.Int64, ParameterDirection.Input);
                    p.Add("@Name", criteriaBo.Name, DbType.String, ParameterDirection.Input, 50);
                    p.Add("@RelationTypeId", criteriaBo.RelationTypeId, DbType.Int32, ParameterDirection.Input);

                    p.Add("@LanguageId", criteriaBo.Session.RealPerson.LanguageId, DbType.Int32, ParameterDirection.Input);
                    p.Add("@OperatorRealId", criteriaBo.Session.RealPerson.Id, DbType.Int64, ParameterDirection.Input);

                    responseBo.Bo        = conn.Query <PersonRelationFindListBo>("spPersonRelationFindList", p, commandType: CommandType.StoredProcedure).ToList();
                    responseBo.Message   = p.Get <string>("@Message");
                    responseBo.IsSuccess = p.Get <bool>("@IsSuccess");
                }
            }
            catch (Exception ex)
            {
                responseBo = base.SaveExLog(ex, this.GetType(), MethodBase.GetCurrentMethod().Name, criteriaBo).ToResponse <List <PersonRelationFindListBo> >();
            }

            return(responseBo);
        }
        public ResponseDto <List <PersonRelationFindListDto> > GetFindList(PersonRelationFindGetListCriteriaDto criteriaDto)
        {
            if (criteriaDto.Name.IsNull() || criteriaDto.Name.Length < 3)
            {
                return(new ResponseDto <List <PersonRelationFindListDto> >()
                {
                    IsSuccess = false,
                    Message = "Lütfen en az 3 karakter giriniz."
                });
            }

            PersonRelationFindGetListCriteriaBo criteriaBo = new PersonRelationFindGetListCriteriaBo()
            {
                ParentPersonId = criteriaDto.ParentPersonId,
                Name           = criteriaDto.Name,
                RelationTypeId = criteriaDto.RelationTypeId,

                Session = Session
            };

            ResponseBo <List <PersonRelationFindListBo> > responseBo = personRelationBusiness.GetFindList(criteriaBo);

            ResponseDto <List <PersonRelationFindListDto> > responseDto = responseBo.ToResponseDto <List <PersonRelationFindListDto>, List <PersonRelationFindListBo> >();

            if (responseBo.IsSuccess && responseBo.Bo != null)
            {
                responseDto.Dto = new List <PersonRelationFindListDto>();
                foreach (PersonRelationFindListBo itemBo in responseBo.Bo)
                {
                    responseDto.Dto.Add(new PersonRelationFindListDto()
                    {
                        PersonId     = itemBo.PersonId,
                        FullName     = itemBo.FullName,
                        PersonTypeId = itemBo.PersonTypeId,

                        TaxNumber = itemBo.TaxNumber.IsNotNull() ? itemBo.TaxNumber.Substring(0, 3) + "****" : itemBo.TaxNumber,
                        TaxOffice = itemBo.TaxOffice,
                        Email     = itemBo.Email,

                        ApprovalStatId      = itemBo.ApprovalStatId,
                        PersonRelationId    = itemBo.PersonRelationId,
                        ChildRelationTypeId = itemBo.ChildRelationTypeId,

                        IsParent = itemBo.IsParent
                    });
                }
            }

            return(responseDto);
        }