Beispiel #1
0
 /// <summary>
 /// Adds the given element to the collection
 /// </summary>
 /// <param name="item">The item to add</param>
 public override void Add(IModelElement item)
 {
     if ((this._parent.ErpProjectAccounting == null))
     {
         IErpProjectAccounting erpProjectAccountingCasted = item.As <IErpProjectAccounting>();
         if ((erpProjectAccountingCasted != null))
         {
             this._parent.ErpProjectAccounting = erpProjectAccountingCasted;
             return;
         }
     }
     if ((this._parent.Status == null))
     {
         IStatus statusCasted = item.As <IStatus>();
         if ((statusCasted != null))
         {
             this._parent.Status = statusCasted;
             return;
         }
     }
     if ((this._parent.ErpTimeSheet == null))
     {
         IErpTimeSheet erpTimeSheetCasted = item.As <IErpTimeSheet>();
         if ((erpTimeSheetCasted != null))
         {
             this._parent.ErpTimeSheet = erpTimeSheetCasted;
             return;
         }
     }
 }
Beispiel #2
0
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(IModelElement item)
            {
                if ((this._parent.ErpProjectAccounting == null))
                {
                    IErpProjectAccounting erpProjectAccountingCasted = item.As <IErpProjectAccounting>();
                    if ((erpProjectAccountingCasted != null))
                    {
                        this._parent.ErpProjectAccounting = erpProjectAccountingCasted;
                        return;
                    }
                }
                IWork worksCasted = item.As <IWork>();

                if ((worksCasted != null))
                {
                    this._parent.Works.Add(worksCasted);
                }
                IRequest requestsCasted = item.As <IRequest>();

                if ((requestsCasted != null))
                {
                    this._parent.Requests.Add(requestsCasted);
                }
                if ((this._parent.BusinessCase == null))
                {
                    IBusinessCase businessCaseCasted = item.As <IBusinessCase>();
                    if ((businessCaseCasted != null))
                    {
                        this._parent.BusinessCase = businessCaseCasted;
                        return;
                    }
                }
                IProject subProjectsCasted = item.As <IProject>();

                if ((subProjectsCasted != null))
                {
                    this._parent.SubProjects.Add(subProjectsCasted);
                }
                if ((this._parent.ParentProject == null))
                {
                    IProject parentProjectCasted = item.As <IProject>();
                    if ((parentProjectCasted != null))
                    {
                        this._parent.ParentProject = parentProjectCasted;
                        return;
                    }
                }
            }