public IList <CuttingOrderLiteDto> GetCuttingOrderForView(CuttingOrderFilter filter)
 {
     return(Builder <CuttingOrderLiteDto>
            .CreateListOfSize(10)
            .All()
            .Build());
 }
예제 #2
0
 public IList <CuttingOrderDto> GetCuttingOrderFilter(CuttingOrderFilter filter)
 {
     //var ret = ExecuteStoreProcedure<CuttingOrder>(new GetLastMoveCuttingOrder());
     return(GetEntities <CuttingOrderFilter, CuttingOrder, CuttingOrderDto>(filter,
                                                                            query => query.FetchEager(x => x.Department)
                                                                            .FetchEager(x => x.Creator)
                                                                            .FetchEager(x => x.District)
                                                                            .FetchEager(x => x.Inspector)
                                                                            //.FetchEager(x => x.Moves)
                                                                            //.FetchEager(x => x.Specifications)
                                                                            .FetchEager(x => x.Storekeeper)));
 }
 public IList <CuttingOrderDto> GetCuttingOrderFilter(CuttingOrderFilter filter)
 {
     return(Builder <CuttingOrderDto>
            .CreateListOfSize(10)
            .All()
            .With(x => x.Creator, Builder <UserDto> .CreateNew().Build())
            .With(x => x.Inspector, Builder <UserDto> .CreateNew().Build())
            .With(x => x.Storekeeper, Builder <UserDto> .CreateNew().Build())
            .With(x => x.Department, Builder <StaffingDivisionDto> .CreateNew().Build())
            .With(x => x.District, Builder <StaffingDivisionDto> .CreateNew().Build())
            .Build());
 }
예제 #4
0
        public void TestCuttingOrderFilterStrategy()
        {
            var filter = new CuttingOrderFilter
            {
                CreationDate            = new Between <DateTime?>(new DateTime(1900, 1, 1), DateTime.Now),
                DateDocumentIntegration = new Between <DateTime?>(new DateTime(1900, 1, 1), DateTime.Now),
                Numb  = 1,
                State = new List <CuttingOrderState> {
                    CuttingOrderState.FirstState
                }
            };
            var query = GetFilterStrategy(
                new CuttingOrderFilterStrategy(), filter);
            var result = query.List();

            Assert.That(result.Count, Is.EqualTo(1));
            Assert.That(result.First().CreationDate, Is.EqualTo(filter.CreationDate));
            Assert.That(result.First().Numb, Is.EqualTo(filter.Numb));
            Assert.That(result.First().DateDocumentIntegration, Is.EqualTo(filter.DateDocumentIntegration));
            Assert.That(filter.State.Contains(result.First().State));
        }
예제 #5
0
 public IList <CuttingOrderLiteDto> GetCuttingOrderForView(CuttingOrderFilter filter)
 {
     throw new NotImplementedException();
 }