예제 #1
0
        //JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
        //ORIGINAL LINE: @Transient public Object clone(boolean cloneAssembly, boolean cloneChild)
        public virtual object Clone(bool cloneAssembly, bool cloneChild)
        {
            AssemblyAssemblyTable obj = new AssemblyAssemblyTable();

            obj.AssemblyChildId = AssemblyChildId;
            obj.LastUpdate      = LastUpdate;
            //obj.setFinalRate(getFinalRate());
            obj.Factor1 = this.Factor1;
            obj.Factor2 = Factor2;
            obj.Factor3 = Factor3;

            obj.QuantityPerUnit             = QuantityPerUnit;
            obj.QuantityPerUnitFormula      = QuantityPerUnitFormula;
            obj.QuantityPerUnitFormulaState = QuantityPerUnitFormulaState;

            obj.LocalFactor        = LocalFactor;
            obj.LocalCountry       = LocalCountry;
            obj.LocalStateProvince = LocalStateProvince;
            obj.ExchangeRate       = ExchangeRate;
            obj.FixedCost          = FixedCost;
            obj.Comment            = Comment;
            obj.PvVars             = PvVars;

            obj.ChildTableId = ChildTableId;
            obj.ProjectId    = ProjectId;

            try
            {
                obj.FinalRate      = calculateFinalRate();
                obj.FinalFixedCost = calculateFinalFixedCost();
            }
            catch (System.NullReferenceException)
            {
                // ignore!
            }

            if (cloneAssembly && ParentTable != null)
            {
                obj.ParentTable = (AssemblyTable)ParentTable.clone();
            }

            if (cloneChild && ChildTable != null)
            {
                obj.ChildTable = (AssemblyTable)ChildTable.clone();
            }

            return(obj);
        }
예제 #2
0
        //JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
        //ORIGINAL LINE: @Transient public Object clone(boolean relations)
        public virtual object Clone(bool relations)
        {
            if (relations)
            {
                return(Clone(true, true));
            }
            AssemblyAssemblyTable obj = new AssemblyAssemblyTable();

            obj.AssemblyChildId = AssemblyChildId;
            obj.LastUpdate      = LastUpdate;
            //obj.setFinalRate(getFinalRate());
            obj.Factor1 = Factor1;
            obj.Factor2 = Factor2;
            obj.Factor3 = Factor3;

            obj.QuantityPerUnit             = QuantityPerUnit;
            obj.QuantityPerUnitFormula      = QuantityPerUnitFormula;
            obj.QuantityPerUnitFormulaState = QuantityPerUnitFormulaState;

            obj.LocalFactor        = LocalFactor;
            obj.LocalCountry       = LocalCountry;
            obj.LocalStateProvince = LocalStateProvince;
            obj.ExchangeRate       = ExchangeRate;
            obj.FixedCost          = FixedCost;
            obj.Comment            = Comment;

            obj.PvVars = PvVars;

            obj.ChildTableId = ChildTableId;
            obj.ProjectId    = ProjectId;

            try
            {
                obj.FinalRate      = calculateFinalRate();
                obj.FinalFixedCost = calculateFinalFixedCost();
            }
            catch (System.NullReferenceException)
            {
                // ignore!
            }

            return(obj);
        }