Exemple #1
0
        // ===============================================================================
        //                                                                         Builder
        //                                                                         =======
        public ListResultBean <ENTITY> BuildListResultBean(IList <ENTITY> selectedList)
        {
            ListResultBean <ENTITY> rb = new ListResultBean <ENTITY>();

            rb.TableDbName    = _tableDbName;
            rb.AllRecordCount = selectedList.Count;
            rb.SelectedList   = selectedList;
            return(rb);
        }
Exemple #2
0
        public ListResultBean <ENTITY> BuildListResultBean(ConditionBean ob, IList <ENTITY> selectedList)
        {
            ListResultBean <ENTITY> rb = new ListResultBean <ENTITY>();

            rb.TableDbName    = _tableDbName;
            rb.AllRecordCount = selectedList.Count;
            rb.SelectedList   = selectedList;
            rb.OrderByClause  = ob.SqlComponentOfOrderByClause;
            return(rb);
        }
        // ===============================================================================
        //                                                                         Mapping
        //                                                                         =======
        #region Mapping
        public ListResultBean <DTO> MappingList <DTO>(EntityDtoMapper <ENTITY, DTO> entityDtoMapper)
        {
            ListResultBean <DTO> mappingList = new ListResultBean <DTO>();

            foreach (ENTITY entity in _selectedList)
            {
                mappingList.Add(entityDtoMapper.Invoke(entity));
            }
            mappingList.TableDbName    = TableDbName;
            mappingList.AllRecordCount = AllRecordCount;
            mappingList.OrderByClause  = OrderByClause;
            return(mappingList);
        }