Ejemplo n.º 1
0
        public Task <int> InsertAsync(DyeingPrintingAreaOutputProductionOrderModel model)
        {
            model.FlagForCreate(_identityProvider.Username, UserAgent);

            _dbSet.Add(model);

            return(_dbContext.SaveChangesAsync());
        }
Ejemplo n.º 2
0
        public Task <int> UpdateAsync(int id, DyeingPrintingAreaOutputProductionOrderModel model)
        {
            var modelToUpdate = _dbSet.FirstOrDefault(s => s.Id == id);

            modelToUpdate.SetArea(model.Area, _identityProvider.Username, UserAgent);
            modelToUpdate.SetDestinationArea(model.DestinationArea, _identityProvider.Username, UserAgent);
            modelToUpdate.SetHasNextAreaDocument(model.HasNextAreaDocument, _identityProvider.Username, UserAgent);
            modelToUpdate.SetNextAreaInputStatus(model.NextAreaInputStatus, _identityProvider.Username, UserAgent);
            modelToUpdate.SetBalance(model.Balance, _identityProvider.Username, UserAgent);
            modelToUpdate.SetBuyer(model.BuyerId, model.Buyer, _identityProvider.Username, UserAgent);
            modelToUpdate.SetCartNo(model.CartNo, _identityProvider.Username, UserAgent);
            modelToUpdate.SetColor(model.Color, _identityProvider.Username, UserAgent);
            modelToUpdate.SetConstruction(model.Construction, _identityProvider.Username, UserAgent);
            modelToUpdate.SetGrade(model.Grade, _identityProvider.Username, UserAgent);
            modelToUpdate.SetMotif(model.Motif, _identityProvider.Username, UserAgent);
            modelToUpdate.SetProductionOrder(model.ProductionOrderId, model.ProductionOrderNo, model.ProductionOrderType, model.ProductionOrderOrderQuantity, _identityProvider.Username, UserAgent);
            modelToUpdate.SetRemark(model.Remark, _identityProvider.Username, UserAgent);
            modelToUpdate.SetPackingInstruction(model.PackingInstruction, _identityProvider.Username, UserAgent);
            modelToUpdate.SetStatus(model.Status, _identityProvider.Username, UserAgent);
            modelToUpdate.SetUnit(model.Unit, _identityProvider.Username, UserAgent);
            modelToUpdate.SetUomUnit(model.UomUnit, _identityProvider.Username, UserAgent);
            modelToUpdate.SetDeliveryOrderSales(model.DeliveryOrderSalesId, model.DeliveryOrderSalesNo, _identityProvider.Username, UserAgent);
            modelToUpdate.SetPackagingType(model.PackagingType, _identityProvider.Username, UserAgent);
            modelToUpdate.SetPackagingQty(model.PackagingQty, _identityProvider.Username, UserAgent);
            modelToUpdate.SetPackagingUnit(model.PackagingUnit, _identityProvider.Username, UserAgent);
            modelToUpdate.SetAvalType(model.AvalType, _identityProvider.Username, UserAgent);
            //modelToUpdate.SetAvalALength(model.AvalALength, _identityProvider.Username, UserAgent);
            //modelToUpdate.SetAvalBLength(model.AvalBLength, _identityProvider.Username, UserAgent);
            //modelToUpdate.SetAvalConnectionLength(model.AvalConnectionLength, _identityProvider.Username, UserAgent);
            modelToUpdate.SetDescription(model.Description, _identityProvider.Username, UserAgent);
            modelToUpdate.SetHasSalesInvoice(model.HasSalesInvoice, _identityProvider.Username, UserAgent);
            modelToUpdate.SetShippingGrade(model.ShippingGrade, _identityProvider.Username, UserAgent);
            modelToUpdate.SetShippingRemark(model.ShippingRemark, _identityProvider.Username, UserAgent);
            modelToUpdate.SetWeight(model.Weight, _identityProvider.Username, UserAgent);
            modelToUpdate.SetMaterial(model.MaterialId, model.MaterialName, _identityProvider.Username, UserAgent);
            modelToUpdate.SetMaterialConstruction(model.MaterialConstructionId, model.MaterialConstructionName, _identityProvider.Username, UserAgent);
            modelToUpdate.SetMachine(model.Machine, _identityProvider.Username, UserAgent);
            modelToUpdate.SetMaterialWidth(model.MaterialWidth, _identityProvider.Username, UserAgent);
            modelToUpdate.SetFinishWidth(model.FinishWidth, _identityProvider.Username, UserAgent);
            return(_dbContext.SaveChangesAsync());
        }
Ejemplo n.º 3
0
        public void Should_Success_Instantiate()
        {
            DyeingPrintingAreaOutputProductionOrderModel model = new DyeingPrintingAreaOutputProductionOrderModel();

            model.SetDateIn(DateTimeOffset.Now, "", "");
        }