コード例 #1
0
        public GarmentCuttingIn(Guid identity, string cutInNo, string cuttingType, string cuttingFrom, string rONo, string article, UnitDepartmentId unitId, string unitCode, string unitName, DateTimeOffset cuttingInDate, double fC) : base(identity)
        {
            Validator.ThrowIfNull(() => unitId);
            Validator.ThrowIfNull(() => rONo);

            //MarkTransient();

            Identity      = identity;
            CutInNo       = cutInNo;
            CuttingType   = cuttingType;
            CuttingFrom   = cuttingFrom;
            RONo          = rONo;
            Article       = article;
            UnitId        = unitId;
            UnitCode      = unitCode;
            UnitName      = unitName;
            CuttingInDate = cuttingInDate;
            FC            = fC;

            ReadModel = new GarmentCuttingInReadModel(Identity)
            {
                CutInNo       = CutInNo,
                CuttingType   = CuttingType,
                CuttingFrom   = CuttingFrom,
                RONo          = RONo,
                Article       = Article,
                UnitId        = UnitId.Value,
                UnitCode      = UnitCode,
                UnitName      = UnitName,
                CuttingInDate = CuttingInDate,
                FC            = FC,
            };

            ReadModel.AddDomainEvent(new OnGarmentCuttingInPlaced(Identity));
        }
コード例 #2
0
        public GarmentAvalComponent(Guid identity, string avalComponentNo, UnitDepartmentId unitId, string unitCode, string unitName, string avalComponentType, string rONo, string article, GarmentComodityId comodityId, string comodityCode, string comodityName, DateTimeOffset date) : base(identity)
        {
            Identity          = identity;
            AvalComponentNo   = avalComponentNo;
            UnitId            = unitId;
            UnitCode          = unitCode;
            UnitName          = unitName;
            AvalComponentType = avalComponentType;
            RONo         = rONo;
            Article      = article;
            ComodityId   = comodityId;
            ComodityCode = comodityCode;
            ComodityName = comodityName;
            Date         = date;

            ReadModel = new GarmentAvalComponentReadModel(Identity)
            {
                AvalComponentNo   = avalComponentNo,
                UnitId            = unitId.Value,
                UnitCode          = unitCode,
                UnitName          = unitName,
                AvalComponentType = avalComponentType,
                RONo         = rONo,
                Article      = article,
                ComodityId   = comodityId.Value,
                ComodityCode = comodityCode,
                ComodityName = comodityName,
                Date         = date
            };
        }
コード例 #3
0
        public GarmentPreparing(Guid identity, int uenId, string uenNo, UnitDepartmentId unitId, string unitCode, string unitName, DateTimeOffset?processDate, string roNo, string article, bool isCuttingIn, Shared.ValueObjects.BuyerId buyerId, string buyerCode, string buyerName) : base(identity)
        {
            this.MarkTransient();

            Identity    = identity;
            UENId       = uenId;
            UENNo       = uenNo;
            UnitId      = unitId;
            UnitCode    = unitCode;
            UnitName    = unitName;
            ProcessDate = processDate;
            RONo        = roNo;
            Article     = article;
            IsCuttingIn = isCuttingIn;
            BuyerId     = buyerId;
            BuyerCode   = buyerCode;
            BuyerName   = buyerName;

            ReadModel = new GarmentPreparingReadModel(Identity)
            {
                UENId       = UENId,
                UENNo       = UENNo,
                UnitId      = UnitId.Value,
                UnitCode    = UnitCode,
                UnitName    = UnitName,
                ProcessDate = ProcessDate,
                RONo        = RONo,
                Article     = Article,
                IsCuttingIn = IsCuttingIn,
                BuyerId     = BuyerId.Value,
                BuyerName   = BuyerName,
                BuyerCode   = BuyerCode
            };
            ReadModel.AddDomainEvent(new OnGarmentPreparingPlaced(this.Identity));
        }
コード例 #4
0
        public GarmentComodityPrice(Guid identity, bool isValid, DateTimeOffset date, UnitDepartmentId unitId, string unitCode, string unitName, GarmentComodityId comodityId, string comodityCode, string comodityName, decimal price) : base(identity)
        {
            Validator.ThrowIfNull(() => unitId);

            //MarkTransient();

            Identity     = identity;
            IsValid      = isValid;
            UnitId       = unitId;
            UnitCode     = unitCode;
            UnitName     = unitName;
            Date         = date;
            ComodityId   = comodityId;
            ComodityCode = comodityCode;
            ComodityName = comodityName;
            Price        = price;

            ReadModel = new GarmentComodityPriceReadModel(Identity)
            {
                IsValid      = IsValid,
                UnitId       = UnitId.Value,
                UnitCode     = UnitCode,
                UnitName     = UnitName,
                Date         = Date,
                ComodityId   = ComodityId.Value,
                ComodityCode = ComodityCode,
                ComodityName = ComodityName,
                Price        = Price
            };

            ReadModel.AddDomainEvent(new OnGarmentComodityPricePlaced(Identity));
        }
 public GarmentFinishedGoodStockHistory(GarmentFinishedGoodStockHistoryReadModel readModel) : base(readModel)
 {
     FinishedGoodStockId         = readModel.FinishedGoodStockId;
     FinishingOutItemId          = readModel.FinishingOutItemId;
     FinishingOutDetailId        = readModel.FinishingOutDetailId;
     ExpenditureGoodId           = readModel.ExpenditureGoodId;
     ExpenditureGoodItemId       = readModel.ExpenditureGoodItemId;
     AdjustmentItemId            = readModel.AdjustmentItemId;
     AdjustmentId                = readModel.AdjustmentId;
     ExpenditureGoodReturnId     = readModel.ExpenditureGoodReturnId;
     ExpenditureGoodReturnItemId = readModel.ExpenditureGoodReturnItemId;
     StockType    = readModel.StockType;
     RONo         = readModel.RONo;
     Article      = readModel.Article;
     UnitId       = new UnitDepartmentId(readModel.UnitId);
     UnitCode     = readModel.UnitCode;
     UnitName     = readModel.UnitName;
     ComodityId   = new GarmentComodityId(readModel.ComodityId);
     ComodityCode = readModel.ComodityCode;
     ComodityName = readModel.ComodityName;
     SizeId       = new SizeId(readModel.SizeId);
     SizeName     = readModel.SizeName;
     Quantity     = readModel.Quantity;
     UomUnit      = readModel.UomUnit;
     UomId        = new UomId(readModel.UomId);
     BasicPrice   = readModel.BasicPrice;
     Price        = readModel.Price;
 }
        public void setUnitId(UnitDepartmentId newUnitId)
        {
            Validator.ThrowIfNull(() => newUnitId);

            if (newUnitId != UnitId)
            {
                UnitId           = newUnitId;
                ReadModel.UnitId = newUnitId.Value;
            }
        }
コード例 #7
0
 public GarmentComodityPrice(GarmentComodityPriceReadModel readModel) : base(readModel)
 {
     IsValid      = readModel.IsValid;
     UnitId       = new UnitDepartmentId(readModel.UnitId);;
     UnitCode     = readModel.UnitCode;
     UnitName     = readModel.UnitName;
     Date         = readModel.Date;
     ComodityId   = new GarmentComodityId(readModel.ComodityId);
     ComodityCode = readModel.ComodityCode;
     ComodityName = readModel.ComodityName;
     Price        = readModel.Price;
 }
コード例 #8
0
 public GarmentCuttingIn(GarmentCuttingInReadModel readModel) : base(readModel)
 {
     CutInNo       = readModel.CutInNo;
     CuttingType   = readModel.CuttingType;
     CuttingFrom   = readModel.CuttingFrom;
     RONo          = readModel.RONo;
     Article       = readModel.Article;
     UnitId        = new UnitDepartmentId(readModel.UnitId);
     UnitCode      = readModel.UnitCode;
     UnitName      = readModel.UnitName;
     CuttingInDate = readModel.CuttingInDate;
     FC            = readModel.FC;
 }
        public GarmentExpenditureGood(Guid identity, string expenditureGoodNo, string expenditureType, UnitDepartmentId unitId, string unitCode, string unitName, string rONo, string article, GarmentComodityId comodityId, string comodityCode, string comodityName, BuyerId buyerId, string buyerCode, string buyerName, DateTimeOffset expenditureDate, string invoice, string contractNo, double carton, string description, bool isReceived) : base(identity)
        {
            Validator.ThrowIfNull(() => unitId);

            //MarkTransient();
            ExpenditureGoodNo = expenditureGoodNo;
            Identity          = identity;
            ExpenditureType   = expenditureType;
            UnitId            = unitId;
            UnitCode          = unitCode;
            UnitName          = unitName;
            RONo            = rONo;
            Article         = article;
            ComodityId      = comodityId;
            ComodityCode    = comodityCode;
            ComodityName    = comodityName;
            BuyerId         = buyerId;
            BuyerCode       = buyerCode;
            BuyerName       = buyerName;
            ExpenditureDate = expenditureDate;
            Invoice         = invoice;
            ContractNo      = contractNo;
            Carton          = carton;
            Description     = description;
            IsReceived      = isReceived;

            ReadModel = new GarmentExpenditureGoodReadModel(Identity)
            {
                ExpenditureGoodNo = ExpenditureGoodNo,
                ExpenditureType   = ExpenditureType,
                ExpenditureDate   = ExpenditureDate,
                RONo         = RONo,
                Article      = Article,
                UnitId       = UnitId.Value,
                UnitCode     = UnitCode,
                UnitName     = UnitName,
                BuyerCode    = BuyerCode,
                BuyerName    = BuyerName,
                BuyerId      = BuyerId.Value,
                ComodityId   = ComodityId.Value,
                ComodityCode = ComodityCode,
                ComodityName = ComodityName,
                Invoice      = Invoice,
                ContractNo   = ContractNo,
                Carton       = Carton,
                Description  = Description,
                IsReceived   = IsReceived
            };

            ReadModel.AddDomainEvent(new OnGarmentExpenditureGoodPlaced(Identity));
        }
コード例 #10
0
 public GarmentAvalComponent(GarmentAvalComponentReadModel readModel) : base(readModel)
 {
     AvalComponentNo   = readModel.AvalComponentNo;
     UnitId            = new UnitDepartmentId((int)readModel.UnitId);
     UnitCode          = readModel.UnitCode;
     UnitName          = readModel.UnitName;
     AvalComponentType = readModel.AvalComponentType;
     RONo         = readModel.RONo;
     Article      = readModel.Article;
     ComodityId   = new GarmentComodityId((int)readModel.ComodityId);
     ComodityCode = readModel.ComodityCode;
     ComodityName = readModel.ComodityName;
     Date         = readModel.Date;
 }
コード例 #11
0
 public GarmentAdjustment(GarmentAdjustmentReadModel readModel) : base(readModel)
 {
     AdjustmentNo   = readModel.AdjustmentNo;
     AdjustmentType = readModel.AdjustmentType;
     RONo           = readModel.RONo;
     Article        = readModel.Article;
     UnitId         = new UnitDepartmentId(readModel.UnitId);
     UnitCode       = readModel.UnitCode;
     UnitName       = readModel.UnitName;
     ComodityId     = new GarmentComodityId(readModel.ComodityId);
     ComodityName   = readModel.ComodityName;
     ComodityCode   = readModel.ComodityCode;
     AdjustmentDate = readModel.AdjustmentDate;
     AdjustmentDesc = readModel.AdjustmentDesc;
 }
コード例 #12
0
 public GarmentPreparing(GarmentPreparingReadModel readModel) : base(readModel)
 {
     UENId       = ReadModel.UENId;
     UENNo       = ReadModel.UENNo;
     UnitId      = new UnitDepartmentId(ReadModel.UnitId);
     UnitCode    = ReadModel.UnitCode;
     UnitName    = ReadModel.UnitName;
     ProcessDate = ReadModel.ProcessDate;
     RONo        = ReadModel.RONo;
     Article     = ReadModel.Article;
     IsCuttingIn = ReadModel.IsCuttingIn;
     BuyerCode   = ReadModel.BuyerCode;
     BuyerId     = new Shared.ValueObjects.BuyerId(ReadModel.BuyerId);
     BuyerName   = ReadModel.BuyerName;
 }
コード例 #13
0
 public GarmentCuttingOut(GarmentCuttingOutReadModel readModel) : base(readModel)
 {
     CutOutNo       = readModel.CutOutNo;
     CuttingOutType = readModel.CuttingOutType;
     UnitFromId     = new UnitDepartmentId(readModel.UnitFromId);
     UnitFromCode   = readModel.UnitFromCode;
     UnitFromName   = readModel.UnitFromName;
     CuttingOutDate = readModel.CuttingOutDate;
     RONo           = readModel.RONo;
     Article        = readModel.Article;
     UnitId         = new UnitDepartmentId(readModel.UnitId);
     UnitCode       = readModel.UnitCode;
     UnitName       = readModel.UnitName;
     ComodityId     = new GarmentComodityId(readModel.ComodityId);
     ComodityCode   = ReadModel.ComodityCode;
     ComodityName   = ReadModel.ComodityName;
 }
コード例 #14
0
 public GarmentSubconCuttingOut(GarmentCuttingOutReadModel readModel) : base(readModel)
 {
     CutOutNo       = readModel.CutOutNo;
     CuttingOutType = readModel.CuttingOutType;
     UnitFromId     = new UnitDepartmentId(readModel.UnitFromId);
     UnitFromCode   = readModel.UnitFromCode;
     UnitFromName   = readModel.UnitFromName;
     CuttingOutDate = readModel.CuttingOutDate;
     RONo           = readModel.RONo;
     Article        = readModel.Article;
     ComodityId     = new GarmentComodityId(readModel.ComodityId);
     ComodityCode   = ReadModel.ComodityCode;
     ComodityName   = ReadModel.ComodityName;
     EPOId          = readModel.EPOId;
     EPOItemId      = readModel.EPOItemId;
     POSerialNumber = readModel.POSerialNumber;
 }
コード例 #15
0
 public GarmentSewingDO(GarmentSewingDOReadModel readModel) : base(readModel)
 {
     SewingDONo   = readModel.SewingDONo;
     CuttingOutId = readModel.CuttingOutId;
     UnitFromId   = new UnitDepartmentId(readModel.UnitFromId);
     UnitFromCode = readModel.UnitFromCode;
     UnitFromName = readModel.UnitFromName;
     UnitId       = new UnitDepartmentId(readModel.UnitId);
     UnitCode     = readModel.UnitCode;
     UnitName     = readModel.UnitName;
     RONo         = readModel.RONo;
     Article      = readModel.Article;
     ComodityId   = new GarmentComodityId(readModel.ComodityId);
     ComodityCode = readModel.ComodityCode;
     ComodityName = readModel.ComodityName;
     SewingDODate = readModel.SewingDODate;
 }
        public GarmentExpenditureGoodReturn(Guid identity, string returNo, string returType, UnitDepartmentId unitId, string unitCode, string unitName, string rONo, string article, GarmentComodityId comodityId, string comodityCode, string comodityName, BuyerId buyerId, string buyerCode, string buyerName, DateTimeOffset returDate, string invoice, string returDesc) : base(identity)
        {
            Validator.ThrowIfNull(() => unitId);

            //MarkTransient();
            ReturNo      = returNo;
            Identity     = identity;
            ReturType    = returType;
            UnitId       = unitId;
            UnitCode     = unitCode;
            UnitName     = unitName;
            RONo         = rONo;
            Article      = article;
            ComodityId   = comodityId;
            ComodityCode = comodityCode;
            ComodityName = comodityName;
            BuyerId      = buyerId;
            BuyerCode    = buyerCode;
            BuyerName    = buyerName;
            ReturDate    = returDate;
            Invoice      = invoice;
            ReturDesc    = returDesc;

            ReadModel = new GarmentExpenditureGoodReturnReadModel(Identity)
            {
                ReturNo      = ReturNo,
                ReturType    = ReturType,
                ReturDate    = ReturDate,
                RONo         = RONo,
                Article      = Article,
                UnitId       = UnitId.Value,
                UnitCode     = UnitCode,
                UnitName     = UnitName,
                BuyerCode    = BuyerCode,
                BuyerName    = BuyerName,
                BuyerId      = BuyerId.Value,
                ComodityId   = ComodityId.Value,
                ComodityCode = ComodityCode,
                ComodityName = ComodityName,
                Invoice      = Invoice,
                ReturDesc    = ReturDesc
            };

            ReadModel.AddDomainEvent(new OnGarmentExpenditureGoodReturnPlaced(Identity));
        }
コード例 #17
0
        public GarmentFinishingIn(Guid identity, string finishingInNo, string finishingInType, UnitDepartmentId unitFromId, string unitFromCode, string unitFromName, string rONo, string article, UnitDepartmentId unitId, string unitCode, string unitName, DateTimeOffset finishingInDate, GarmentComodityId comodityId, string comodityCode, string comodityName, long doId, string doNo) : base(identity)
        {
            Validator.ThrowIfNull(() => unitId);

            //MarkTransient();
            FinishingInNo   = finishingInNo;
            Identity        = identity;
            FinishingInType = finishingInType;
            UnitFromCode    = unitFromCode;
            UnitFromName    = unitFromName;
            UnitFromId      = unitFromId;
            RONo            = rONo;
            Article         = article;
            UnitId          = unitId;
            UnitCode        = unitCode;
            UnitName        = unitName;
            ComodityId      = comodityId;
            FinishingInDate = finishingInDate;
            ComodityCode    = comodityCode;
            ComodityName    = comodityName;
            DOId            = doId;
            DONo            = doNo;

            ReadModel = new GarmentFinishingInReadModel(Identity)
            {
                FinishingInDate = FinishingInDate,
                FinishingInNo   = FinishingInNo,
                FinishingInType = FinishingInType,
                RONo            = RONo,
                Article         = Article,
                UnitId          = UnitId.Value,
                UnitCode        = UnitCode,
                UnitName        = UnitName,
                UnitFromCode    = UnitFromCode,
                UnitFromName    = UnitFromName,
                UnitFromId      = UnitFromId.Value,
                ComodityId      = ComodityId.Value,
                ComodityCode    = ComodityCode,
                ComodityName    = ComodityName,
                DOId            = DOId,
                DONo            = DONo
            };

            ReadModel.AddDomainEvent(new OnGarmentFinishingInPlaced(Identity));
        }
コード例 #18
0
 public GarmentLoading(GarmentLoadingReadModel readModel) : base(readModel)
 {
     LoadingNo    = readModel.LoadingNo;
     RONo         = readModel.RONo;
     Article      = readModel.Article;
     UnitId       = new UnitDepartmentId(readModel.UnitId);
     UnitCode     = readModel.UnitCode;
     UnitName     = readModel.UnitName;
     SewingDOId   = readModel.SewingDOId;
     SewingDONo   = readModel.SewingDONo;
     UnitFromCode = readModel.UnitFromCode;
     UnitFromName = readModel.UnitFromName;
     UnitFromId   = new UnitDepartmentId(readModel.UnitFromId);
     ComodityId   = new GarmentComodityId(readModel.ComodityId);
     ComodityName = readModel.ComodityName;
     ComodityCode = readModel.ComodityCode;
     LoadingDate  = readModel.LoadingDate;
 }
コード例 #19
0
 public GarmentFinishingOut(GarmentFinishingOutReadModel readModel) : base(readModel)
 {
     FinishingOutNo   = readModel.FinishingOutNo;
     FinishingTo      = readModel.FinishingTo;
     UnitToId         = new UnitDepartmentId(readModel.UnitToId);
     UnitToCode       = readModel.UnitToCode;
     UnitToName       = readModel.UnitToName;
     FinishingOutDate = readModel.FinishingOutDate;
     RONo             = readModel.RONo;
     Article          = readModel.Article;
     UnitId           = new UnitDepartmentId(readModel.UnitId);
     UnitCode         = readModel.UnitCode;
     UnitName         = readModel.UnitName;
     ComodityId       = new GarmentComodityId(readModel.ComodityId);
     ComodityCode     = readModel.ComodityCode;
     ComodityName     = readModel.ComodityName;
     IsDifferentSize  = readModel.IsDifferentSize;
 }
コード例 #20
0
        public GarmentCuttingOut(Guid identity, string cutOutNo, string cuttingOutType, UnitDepartmentId unitFromId, string unitFromCode, string unitFromName, DateTimeOffset cuttingOutDate, string rONo, string article, UnitDepartmentId unitId, string unitCode, string unitName, GarmentComodityId comodityId, string comodityCode, string comodityName) : base(identity)
        {
            Validator.ThrowIfNull(() => unitFromId);
            Validator.ThrowIfNull(() => unitId);
            Validator.ThrowIfNull(() => rONo);

            //MarkTransient();

            Identity       = identity;
            CutOutNo       = cutOutNo;
            CuttingOutType = cuttingOutType;
            UnitFromId     = unitFromId;
            UnitFromCode   = unitFromCode;
            UnitFromName   = unitFromName;
            CuttingOutDate = cuttingOutDate;
            RONo           = rONo;
            Article        = article;
            UnitId         = unitId;
            UnitCode       = unitCode;
            UnitName       = unitName;
            ComodityId     = comodityId;
            ComodityCode   = comodityCode;
            ComodityName   = comodityName;

            ReadModel = new GarmentCuttingOutReadModel(Identity)
            {
                CutOutNo       = CutOutNo,
                CuttingOutType = CuttingOutType,
                UnitFromId     = UnitFromId.Value,
                UnitFromCode   = UnitFromCode,
                UnitFromName   = UnitFromName,
                CuttingOutDate = CuttingOutDate,
                RONo           = RONo,
                Article        = Article,
                UnitId         = UnitId.Value,
                UnitCode       = UnitCode,
                UnitName       = UnitName,
                ComodityId     = ComodityId.Value,
                ComodityCode   = ComodityCode,
                ComodityName   = ComodityName,
            };

            ReadModel.AddDomainEvent(new OnGarmentCuttingOutPlaced(Identity));
        }
コード例 #21
0
        public GarmentLoading(Guid identity, string loadingNo, Guid sewingDOId, string sewingDONo, UnitDepartmentId unitFromId, string unitFromCode, string unitFromName, string rONo, string article, UnitDepartmentId unitId, string unitCode, string unitName, DateTimeOffset loadingDate, GarmentComodityId comodityId, string comodityCode, string comodityName) : base(identity)
        {
            Validator.ThrowIfNull(() => unitId);
            //Validator.ThrowIfNull(() => sewingDOId);

            //MarkTransient();
            LoadingNo    = loadingNo;
            Identity     = identity;
            SewingDOId   = sewingDOId;
            SewingDONo   = sewingDONo;
            UnitFromCode = unitFromCode;
            UnitFromName = unitFromName;
            UnitFromId   = unitFromId;
            RONo         = rONo;
            Article      = article;
            UnitId       = unitId;
            UnitCode     = unitCode;
            UnitName     = unitName;
            ComodityId   = comodityId;
            LoadingDate  = loadingDate;
            ComodityCode = comodityCode;
            ComodityName = comodityName;

            ReadModel = new GarmentLoadingReadModel(Identity)
            {
                LoadingDate  = LoadingDate,
                LoadingNo    = LoadingNo,
                RONo         = RONo,
                Article      = Article,
                UnitId       = UnitId.Value,
                UnitCode     = UnitCode,
                UnitName     = UnitName,
                SewingDOId   = SewingDOId,
                SewingDONo   = SewingDONo,
                UnitFromCode = UnitFromCode,
                UnitFromName = UnitFromName,
                UnitFromId   = UnitFromId.Value,
                ComodityId   = ComodityId.Value,
                ComodityCode = ComodityCode,
                ComodityName = ComodityName
            };

            ReadModel.AddDomainEvent(new OnGarmentLoadingPlaced(Identity));
        }
コード例 #22
0
 public GarmentSewingIn(GarmentSewingInReadModel readModel) : base(readModel)
 {
     SewingInNo   = readModel.SewingInNo;
     SewingFrom   = readModel.SewingFrom;
     LoadingId    = readModel.LoadingId;
     LoadingNo    = readModel.LoadingNo;
     UnitFromId   = new UnitDepartmentId(readModel.UnitFromId);
     UnitFromCode = readModel.UnitFromCode;
     UnitFromName = readModel.UnitFromName;
     UnitId       = new UnitDepartmentId(readModel.UnitId);
     UnitCode     = readModel.UnitCode;
     UnitName     = readModel.UnitName;
     RONo         = readModel.RONo;
     Article      = readModel.Article;
     ComodityId   = new GarmentComodityId(readModel.ComodityId);
     ComodityCode = readModel.ComodityCode;
     ComodityName = readModel.ComodityName;
     SewingInDate = readModel.SewingInDate;
 }
コード例 #23
0
 public GarmentFinishingIn(GarmentFinishingInReadModel readModel) : base(readModel)
 {
     FinishingInNo   = readModel.FinishingInNo;
     RONo            = readModel.RONo;
     Article         = readModel.Article;
     UnitId          = new UnitDepartmentId(readModel.UnitId);
     UnitCode        = readModel.UnitCode;
     UnitName        = readModel.UnitName;
     UnitFromCode    = readModel.UnitFromCode;
     UnitFromName    = readModel.UnitFromName;
     UnitFromId      = new UnitDepartmentId(readModel.UnitFromId);
     ComodityId      = new GarmentComodityId(readModel.ComodityId);
     ComodityName    = readModel.ComodityName;
     ComodityCode    = readModel.ComodityCode;
     FinishingInDate = readModel.FinishingInDate;
     FinishingInType = readModel.FinishingInType;
     DOId            = readModel.DOId;
     DONo            = readModel.DONo;
 }
コード例 #24
0
 public GarmentFinishedGoodStock(GarmentFinishedGoodStockReadModel readModel) : base(readModel)
 {
     FinishedGoodStockNo = readModel.FinishedGoodStockNo;
     RONo         = readModel.RONo;
     Article      = readModel.Article;
     UnitId       = new UnitDepartmentId(readModel.UnitId);
     UnitCode     = readModel.UnitCode;
     UnitName     = readModel.UnitName;
     ComodityId   = new GarmentComodityId(readModel.ComodityId);
     ComodityCode = readModel.ComodityCode;
     ComodityName = readModel.ComodityName;
     SizeId       = new SizeId(readModel.SizeId);
     SizeName     = readModel.SizeName;
     Quantity     = readModel.Quantity;
     UomUnit      = readModel.UomUnit;
     UomId        = new UomId(readModel.UomId);
     BasicPrice   = readModel.BasicPrice;
     Price        = readModel.Price;
 }
        public GarmentDeliveryReturn(Guid identity, string drNo, string roNo, string article, int unitDOId, string unitDONo, int uenId, string preparingId, DateTimeOffset?returnDate, string returnType, UnitDepartmentId unitId, string unitCode, string unitName, StorageId storageId, string storageName, string storageCode, bool isUsed) : base(identity)
        {
            this.MarkTransient();

            Identity    = identity;
            DRNo        = drNo;
            RONo        = roNo;
            Article     = article;
            UnitDOId    = unitDOId;
            UnitDONo    = unitDONo;
            UENId       = uenId;
            PreparingId = preparingId;
            ReturnDate  = returnDate;
            ReturnType  = returnType;
            UnitId      = unitId;
            UnitCode    = unitCode;
            UnitName    = unitName;
            StorageId   = storageId;
            StorageCode = storageCode;
            StorageName = storageName;
            IsUsed      = isUsed;

            ReadModel = new GarmentDeliveryReturnReadModel(identity)
            {
                DRNo        = DRNo,
                RONo        = RONo,
                Article     = Article,
                UnitDOId    = UnitDOId,
                UnitDONo    = UnitDONo,
                UENId       = UENId,
                PreparingId = PreparingId,
                ReturnDate  = ReturnDate,
                ReturnType  = ReturnType,
                UnitId      = UnitId.Value,
                UnitCode    = UnitCode,
                UnitName    = UnitName,
                StorageId   = StorageId.Value,
                StorageCode = StorageCode,
                StorageName = StorageName,
                IsUsed      = IsUsed,
            };
            ReadModel.AddDomainEvent(new OnGarmentDeliveryReturnPlaced(this.Identity));
        }