예제 #1
0
        private void UpdateSpecialSlope()
        {
            double val1, val2;

            double.TryParse(perMixRates[13][0].ToString(), out val1);
            double.TryParse(perMixRates[14][0].ToString(), out val2);
            double latherate = hasMortarBed ?val1: val2;

            Slope slp = UrethaneSlopes.FirstOrDefault(x => x.Thickness == "1 1/4 inch Mortar Bed with 2x2 or diamond metal lathe");

            if (slp != null)
            {
                slp.latheRate           = latherate;
                slp.LaborExtensionSlope = (slp.Sqft / slp.GSLaborRate + slp.Sqft / latherate) * laborRate;
            }
        }
        public override void CalculateGridTotal()
        {
            base.CalculateGridTotal();

            if (UrethaneSlopes.Count > 0)
            {
                ///sumtotal
                UrethaneSumTotal = Math.Round(UrethaneSlopes.Select(x => x.Total).Sum(), 2);

                if (OverrideManually == false)
                {
                    ///sumtotalmixes
                    UrethaneSumTotalMixes = Math.Round(UrethaneSlopes.Select(x => x.TotalMixes).Sum(), 2);

                    ///sumtotalmatext

                    UrethaneSumTotalMatExt = Math.Round(UrethaneSlopes.Select(x => x.MaterialExtensionSlope).Sum(), 2);
                    //sumtotallaborext

                    UrethaneSumTotalLaborExt = Math.Round(UrethaneSlopes.Select(x => x.LaborExtensionSlope).Sum(), 2);
                }
            }
        }
예제 #3
0
        public override void CalculateGridTotal()
        {
            base.CalculateGridTotal();

            if (UrethaneSlopes.Count > 0)
            {
                ///sumtotal
                UrethaneSumTotal = Math.Round(UrethaneSlopes.Select(x => x.Total).Sum(), 2);

                ///sumtotalmixes
                //UrethaneSumTotalMixes = Math.Round(UrethaneSlopes.Select(x => x.TotalMixes).Sum(), 2);
                UrethaneSumTotalMixes = Math.Round(UrethaneSlopes.Where(x => x.Thickness == "1 1/4 inch Mortar Bed with 2x2 or diamond metal lathe").FirstOrDefault().TotalMixes, 2);
                ///sumtotalmatext

                UrethaneSumTotalMatExt = Math.Round(UrethaneSlopes.Select(x => x.MaterialExtensionSlope).Sum(), 2);
                //sumtotallaborext

                UrethaneSumTotalLaborExt = Math.Round(UrethaneSlopes.Select(x => x.LaborExtensionSlope).Sum(), 2);
            }
            OnPropertyChanged("MortarSumTotal");
            OnPropertyChanged("MortarSumTotalMixes");
            OnPropertyChanged("MortarSumTotalMatExt");
            OnPropertyChanged("MortarSumTotalLaborExt");
        }