Ejemplo n.º 1
0
        public virtual object clone()
        {
            //		if ( o_map == null ) o_map = new HashMap();

            QuoteItemTable obj = new QuoteItemTable();

            obj.SupplierDatabaseId   = SupplierDatabaseId;
            obj.DatabaseId           = DatabaseId;
            obj.DatabaseCreationDate = DatabaseCreationDate;
            obj.QuoteItemId          = QuoteItemId;
            obj.Title        = Title;
            obj.Unit         = Unit;
            obj.Resource     = Resource;
            obj.State        = State;
            obj.Quantity     = Quantity;
            obj.ManHours     = ManHours;
            obj.IndirectCost = IndirectCost;
            obj.IndirectRate = IndirectRate;
            obj.Material     = Material;
            obj.MainQuantity = MainQuantity;
            obj.Factor1      = Factor1;
            obj.Factor2      = Factor2;
            obj.Insurance    = Insurance;
            obj.Rate         = Rate;
            obj.ShipmentCost = ShipmentCost;
            obj.ShipmentRate = ShipmentRate;
            obj.FinalRate    = calculateFinalRate();
            obj.ProjectId    = ProjectId;

            return(obj);
        }
Ejemplo n.º 2
0
        public virtual int CompareTo(object b)
        {
            QuoteItemTable o = (QuoteItemTable)b;

            if (o.boqItemTable != null)
            {
                return(-o.boqItemTable.BoqitemId.compareTo(boqItemTable.BoqitemId));
            }
            return(o.title.CompareTo(title));
        }
Ejemplo n.º 3
0
        public override object clone(bool cloneParent, bool cloneResource)
        {
            QuoteItemTable obj = (QuoteItemTable)clone();

            if (cloneResource && BoqItemTable != null)
            {
                obj.BoqItemTable = (BoqItemTable)BoqItemTable.clone();
            }
            if (cloneParent && QuotationTable != null)
            {
                obj.QuotationTable = (QuotationTable)QuotationTable.clone();
            }

            return(obj);
        }
Ejemplo n.º 4
0
        public virtual QuotationTable copyWithItems()
        {
            QuotationTable obj = (QuotationTable)clone();

            if (QuoteItemSet != null)
            {
                obj.quoteItemSet = new HashSet <object>();
                System.Collections.IEnumerator iter = quoteItemSet.GetEnumerator();
                while (iter.MoveNext())
                {
                    QuoteItemTable curMat = (QuoteItemTable)iter.Current;
                    obj.quoteItemSet.Add((QuoteItemTable)curMat.clone());
                }
            }

            return(obj);
        }
Ejemplo n.º 5
0
        public override bool Equals(object o1)
        {
            if (!(o1 is QuoteItemTable))
            {
                return(false);
            }
            QuoteItemTable o = (QuoteItemTable)o1;

            if (o.quoteItemId != null && quoteItemId != null)
            {
                return(quoteItemId.Equals(o.quoteItemId));
            }
            else if (o.boqItemTable != null)
            {
                return(o.boqItemTable.BoqitemId.Equals(boqItemTable.BoqitemId));
            }

            return(o.title.Equals(title));
        }