コード例 #1
0
 public static void UpdateHeatChartDetails(this HeatChartDetails heatChartDetails, HeatChartDetailsVM heatChartDetailsVM)
 {
     heatChartDetails.HeatChartHeaderID     = heatChartDetailsVM.HeatChartHeaderID;
     heatChartDetails.PartNumber            = heatChartDetailsVM.PartNumber;
     heatChartDetails.PartNumberDescription = heatChartDetailsVM.PartNumberDescription;
     heatChartDetails.SheetNo          = heatChartDetailsVM.SheetNo;
     heatChartDetails.SpecificationsID = heatChartDetailsVM.SpecificationSelected.ID;
     heatChartDetails.Dimension        = heatChartDetailsVM.Dimension;
 }
コード例 #2
0
        public static HeatChartDetailsVM MapHeatChartDetail(HeatChartDetails heatChartDetail)
        {
            var heatChartDetailVM = AutoMapper.Map <HeatChartDetails, HeatChartDetailsVM>(heatChartDetail);

            heatChartDetailVM.SpecificationSelected = AutoMapper.Map <Specifications, SpecificationsVM>(heatChartDetail.Specification);
            heatChartDetailVM.Dimension             = heatChartDetail.Dimension;

            return(heatChartDetailVM);
        }
コード例 #3
0
        private void UpdateHeatChartDetailMaterialRegisterRelationshipAddUpdate(HeatChartDetails heatChartDetails, HeatChartDetailsVM heatChartDetailsVM)

        {
            var relationship = heatChartDetails.HeathChartMaterialHeaderRelationships;

            if (relationship == null)
            {
                relationship = new HeatChartMaterialHeaderRelationship();
            }

            relationship.MaterialRegisterHeaderID    = heatChartDetailsVM.MaterialRegisterHeaderSelected.ID;
            relationship.MaterialRegisterSubSeriesID = heatChartDetailsVM.MaterialRegisterSubSeriesSelected.ID;

            if (relationship != null)
            {
                _heatChartMaterialHeaderRelationshipRepository.Update(relationship);
            }
            else
            {
                _heatChartMaterialHeaderRelationshipRepository.Insert(relationship);
            }
        }