private void FillByGetPermutation(CommonLibrary.Enumerations.GetPermutations getPermutation, CodeSampleApplication.Bo.Person filledBo) { if (this.BaseDataAccessAvailable()) { this.Clear(); CodeSampleApplication.Dto.Person dto = ((CodeSampleApplication.Dto.Person)(filledBo)); List <CodeSampleApplication.Dto.Person> returnDto = _baseDataAccess.Get(dto, getPermutation); int control = returnDto.Count; if ((control > 0)) { int counter; for (counter = 0; (counter < control); counter = (counter + 1)) { CodeSampleApplication.Bo.Person boToFill = new CodeSampleApplication.Bo.Person(); _baseBusiness.FillThisWithDto(returnDto[counter], boToFill); this.Add(boToFill); } } } else { throw new System.ApplicationException(FILL_DB_SETTINGS_EXCEPTION); } }
public virtual void FillByGetAll(CodeSampleApplication.Bo.Person filledBo) { CommonLibrary.Enumerations.GetPermutations getPermutation = CommonLibrary.Enumerations.GetPermutations.AllByColumnMappings; this.FillByGetPermutation(getPermutation, filledBo); }
public virtual void FillByCriteriaExact(CodeSampleApplication.Bo.Person filledBo) { CommonLibrary.Enumerations.GetPermutations getPermutation = CommonLibrary.Enumerations.GetPermutations.ByExplicitCriteria; this.FillByGetPermutation(getPermutation, filledBo); }
public virtual void FillByPrimaryKey(CodeSampleApplication.Bo.Person filledBo) { CommonLibrary.Enumerations.GetPermutations getPermutation = CommonLibrary.Enumerations.GetPermutations.ByPrimaryKey; this.FillByGetPermutation(getPermutation, filledBo); }
private void FillPropertiesFromBo(CodeSampleApplication.Bo.Person filledBo) { _baseBusiness.FillPropertiesFromBo(filledBo, this); }
public Person(CommonLibrary.DatabaseSmoObjectsAndSettings databaseSmoObjectsAndSettings, CodeSampleApplication.Bo.Person filledBo) { _databaseSmoObjectsAndSettings = databaseSmoObjectsAndSettings; _baseDataAccess = new CommonLibrary.Base.Database.BaseDataAccess <CodeSampleApplication.Dto.Person>(_databaseSmoObjectsAndSettings); _baseBusiness = new CommonLibrary.Base.Business.BaseBusiness <CodeSampleApplication.Bo.Person, CodeSampleApplication.Dto.Person>(); this.FillPropertiesFromBo(filledBo); }