Ejemplo n.º 1
0
        //calculate for Desert Crete
        public override void calculateRLqty()
        {
            double         val1 = 0, val2 = 0;
            SystemMaterial sysMat = SystemMaterials.Where(x => x.Name == "PARATERM BAR LF (TOP ONLY- STANDARD INSTALL)").FirstOrDefault();

            if (sysMat != null)
            {
                val1 = sysMat.IsMaterialChecked ? sysMat.Qty : 0;
            }
            sysMat = SystemMaterials.Where(x => x.Name == "EXTRA PARATERM BAR LF (BOTTOM OR SIDES)").FirstOrDefault();
            if (sysMat != null)
            {
                val2 = sysMat.IsMaterialChecked ? sysMat.Qty : 0;
            }
            sysMat = SystemMaterials.Where(x => x.Name == "PINS & LOADS").FirstOrDefault();
            if (sysMat != null)
            {
                bool ischecked;
                ischecked  = sysMat.IsMaterialChecked;
                sysMat.Qty = sysMat.SMSqft / sysMat.Coverage + (val1 + val2) / 2;
                sysMat.IsMaterialChecked = ischecked;
            }
            sysMat = SystemMaterials.Where(x => x.Name == "PARASEAL LG ROLLS (4X24)").FirstOrDefault();
            if (sysMat != null)
            {
                OtherItem olm = OtherMaterials.Where(x => x.Name == "Linear footage for seams if needed for submerged conditions")
                                .FirstOrDefault();
                if (olm != null)
                {
                    olm.Quantity  = Math.Round(sysMat.Qty * 28, 2);
                    olm.LQuantity = Math.Round(sysMat.Qty * 28, 2);
                }
            }
        }
        //calculate for Desert Crete
        public override void calculateRLqty()
        {
            double         val1 = 0, val2 = 0;
            SystemMaterial sysMat = SystemMaterials.Where(x => x.Name == "PARATERM BAR LF (TOP ONLY- STANDARD INSTALL)").FirstOrDefault();

            if (sysMat != null)
            {
                val1 = sysMat.IsMaterialChecked ? sysMat.Qty : 0;
            }
            sysMat = SystemMaterials.Where(x => x.Name == "EXTRA PARATERM BAR LF (BOTTOM OR SIDES)").FirstOrDefault();
            if (sysMat != null)
            {
                val2 = sysMat.IsMaterialChecked ? sysMat.Qty : 0;
            }
            sysMat = SystemMaterials.Where(x => x.Name == "PINS & LOADS").FirstOrDefault();
            if (sysMat != null)
            {
                bool ischecked;
                ischecked = sysMat.IsMaterialChecked;
                SystemMaterial sm = SystemMaterials.Where(x => x.Name == "TREMDRAIN 1000 (VERTICAL ONLY)").FirstOrDefault();
                if (sm != null)
                {
                    sysMat.Coverage = sm.IsMaterialChecked?  6 + sm.Qty * 200 / 500:6;
                }
                sysMat.Qty = sysMat.SMSqft / sysMat.Coverage + (val1 + val2) / 2;
                sysMat.IsMaterialChecked = ischecked;
            }
            sysMat = SystemMaterials.Where(x => x.Name == "PARASEAL \"STANDARD\" ROLLS (4X24)").FirstOrDefault();
            if (sysMat != null)
            {
                SystemMaterial myMat = SystemMaterials.Where(x => x.Name == "SEAM TAPE").FirstOrDefault();
                myMat.SMSqft = sysMat.Qty * 28;
                myMat.Qty    = myMat.SMSqft / myMat.Coverage;
                OtherItem oLm = OtherMaterials.Where(x => x.Name == "Linear footage for seams if needed for submerged conditions").FirstOrDefault();
                if (oLm != null)
                {
                    oLm.Quantity  = Math.Round(sysMat.Qty * 28, 2);
                    oLm.LQuantity = Math.Round(sysMat.Qty * 28, 2);
                }
            }
        }