예제 #1
0
        public void ProduceLabel(int orderDetailId, double poundWeight, OmsLabelType labelType, int quantity = 1, DateTime?processDate = null, QualityGrade qualityGrade = null, AnimalLabelsViewModel animalLabel = null, CaseSize customCaseSize = null)
        {
            var context = new OmsContext();

            _orderDetailRepository = new OrderDetailRepository(context);
            var orderDetail = _orderDetailRepository.GetLabelInfo(orderDetailId);
            var model       = GetLabelLayoutViewModel(poundWeight, orderDetail, labelType, false, qualityGrade, animalLabel, customCaseSize);

            for (var i = 0; i < quantity; i++)
            {
                ProduceLabel(labelType, model, orderDetail, false, processDate);
            }
            context.Dispose();
        }