| | |
| | | |
| | | var maxSort = await _wmsmaterialRepository.GetMaxSortAsync(); |
| | | var sort = input.Sort ?? maxSort; |
| | | var wmsmaterial = new WmsMaterial |
| | | { |
| | | |
| | | }; |
| | | var wmsmaterial = ObjectMapper.Map<WmsMaterialCreateDto, WmsMaterial>(input); |
| | | wmsmaterial.Sort = sort; |
| | | input.MapExtraPropertiesTo(wmsmaterial, MappingPropertyDefinitionChecks.None); |
| | | |
| | | await _wmsmaterialRepository.InsertAsync(wmsmaterial); |
| | |
| | | wmsmaterial.SetConcurrencyStampIfNotNull(input.ConcurrencyStamp); |
| | | input.MapExtraPropertiesTo(wmsmaterial, MappingPropertyDefinitionChecks.None); |
| | | |
| | | wmsmaterial.MaterialCode = input.MaterialCode; |
| | | wmsmaterial.MaterialName = input.MaterialName; |
| | | wmsmaterial.PurchaseType = input.PurchaseType; |
| | | wmsmaterial.MaterialType = input.MaterialType; |
| | | wmsmaterial.PrimaryUnit = input.PrimaryUnit; |
| | | wmsmaterial.Standard = input.Standard; |
| | | wmsmaterial.OuterDiameter = input.OuterDiameter; |
| | | wmsmaterial.WallThickness = input.WallThickness; |
| | | wmsmaterial.MaterialQuality = input.MaterialQuality; |
| | | wmsmaterial.Length = input.Length; |
| | | wmsmaterial.IsMainBranch = input.IsMainBranch; |
| | | wmsmaterial.Factory = input.Factory; |
| | | wmsmaterial.Certification = input.Certification; |
| | | |
| | | await _wmsmaterialRepository.UpdateAsync(wmsmaterial); |
| | | |
| | |
| | | { |
| | | MaterialCode = wmsmaterial.MaterialCode, |
| | | MaterialName = wmsmaterial.MaterialName, |
| | | PurchaseType = wmsmaterial.PurchaseType, |
| | | MaterialType = wmsmaterial.MaterialType, |
| | | PrimaryUnit = wmsmaterial.PrimaryUnit, |
| | | Standard = wmsmaterial.Standard, |
| | | OuterDiameter = wmsmaterial.OuterDiameter, |
| | | WallThickness = wmsmaterial.WallThickness, |
| | | MaterialQuality = wmsmaterial.MaterialQuality, |
| | | Length = wmsmaterial.Length, |
| | | IsMainBranch = wmsmaterial.IsMainBranch, |
| | | Factory = wmsmaterial.Factory, |
| | | Certification = wmsmaterial.Certification, |
| | | Remark = wmsmaterial.Remark, |
| | | }; |
| | | |
| | |
| | | { |
| | | MaterialCode = wmsmaterial.MaterialCode, |
| | | MaterialName = wmsmaterial.MaterialName, |
| | | PurchaseType = wmsmaterial.PurchaseType, |
| | | MaterialType = wmsmaterial.MaterialType, |
| | | PrimaryUnit = wmsmaterial.PrimaryUnit, |
| | | Standard = wmsmaterial.Standard, |
| | | OuterDiameter = wmsmaterial.OuterDiameter, |
| | | WallThickness = wmsmaterial.WallThickness, |
| | | MaterialQuality = wmsmaterial.MaterialQuality, |
| | | Length = wmsmaterial.Length, |
| | | IsMainBranch = wmsmaterial.IsMainBranch, |
| | | Factory = wmsmaterial.Factory, |
| | | Certification = wmsmaterial.Certification, |
| | | Remark = wmsmaterial.Remark, |
| | | }; |
| | | |