Пример #1
0
 /// <summary>
 /// 创建套餐模板空间详情构造器
 /// </summary>
 /// <param name="numericalStandard">数值标准</param>
 /// <param name="groundLength">地面长度</param>
 /// <param name="groundWidth">地面宽度</param>
 /// <param name="spacePerimeter">空间周长</param>
 /// <param name="wallHigh">墙面高度</param>
 /// <param name="holeArea">洞口面积</param>
 /// <param name="facadeArea">立面面积</param>
 /// <param name="groundArea">地面面积</param>
 /// <param name="ceilingArea">棚面面积</param>
 public DecorationPackSpaceDetail(NumericalStandard numericalStandard, decimal groundLength, decimal groundWidth, decimal spacePerimeter, decimal wallHigh, decimal holeArea, decimal facadeArea, decimal groundArea, decimal ceilingArea)
 {
     NumericalStandard = numericalStandard;
     GroundLength      = groundLength;
     GroundWidth       = groundWidth;
     SpacePerimeter    = spacePerimeter;
     WallHigh          = wallHigh;
     HoleArea          = holeArea;
     FacadeArea        = facadeArea;
     GroundArea        = groundArea;
     CeilingArea       = ceilingArea;
 }
 /// <summary>
 /// 修改套餐模板空间详情
 /// </summary>
 /// <param name="spaceDetailId">套餐模板空间详情Id</param>
 /// <param name="numericalStandard">数值标准</param>
 /// <param name="groundLength">地面长度</param>
 /// <param name="groundWidth">地面宽度</param>
 /// <param name="spacePerimeter">空间周长</param>
 /// <param name="wallHigh">墙面高度</param>
 /// <param name="holeArea">洞口面积</param>
 /// <param name="facadeArea">立面面积</param>
 /// <param name="groundArea">地面面积</param>
 /// <param name="ceilingArea">棚面面积</param>
 public void UpdateSpaceDetail(Guid?spaceDetailId, NumericalStandard numericalStandard, decimal groundLength, decimal groundWidth, decimal spacePerimeter, decimal wallHigh, decimal holeArea, decimal facadeArea, decimal groundArea, decimal ceilingArea)
 {
     if (spaceDetailId.HasValue)
     {
         DecorationPackSpaceDetail spaceDetail = this.SpaceDetails.SingleOrDefault(x => x.Id == spaceDetailId);
         Assert.IsFalse(spaceDetail == null, "套餐模板空间详情不存在!");
         spaceDetail.UpdateSpaceDetailInfo(numericalStandard, groundLength, groundWidth, spacePerimeter, wallHigh, holeArea, facadeArea, groundArea,
                                           ceilingArea);
     }
     else
     {
         DecorationPackSpaceDetail spaceDetail = new DecorationPackSpaceDetail(numericalStandard, groundLength, groundWidth, spacePerimeter, wallHigh, holeArea, facadeArea, groundArea,
                                                                               ceilingArea);
         this.AddSpaceDetail(spaceDetail);
     }
 }