protected void CopyValues(WorkReportResourceInfo source)
        {
            if (source == null)
            {
                return;
            }

            _base.CopyValues(source);
        }
        public static WorkReportResource NewChild(WorkReport parent, WorkReportResourceInfo item)
        {
            if (!CanAddObject())
            {
                throw new System.Security.SecurityException(moleQule.Resources.Messages.USER_NOT_ALLOWED);
            }

            WorkReportResource obj = DataPortal.Create <WorkReportResource>(new CriteriaCs(-1));

            obj.CopyFrom(parent);
            obj.CopyFrom(item);
            obj.MarkAsChild();
            return(obj);
        }
        protected virtual void CopyFrom(WorkReportResourceInfo source)
        {
            if (source == null)
            {
                return;
            }

            OidResource = source.OidResource;
            EntityType  = source.EntityType;
            Cost        = source.Cost;
            Amount      = source.Amount;
            Hours       = source.Amount;

            ResourceID = source.ResourceID;
            Resource   = source.Resource;
        }
        public void CopyValues(WorkReportResourceInfo source)
        {
            if (source == null)
            {
                return;
            }

            _record.CopyValues(source.Base.Record);

            _oid_category   = source.OidCategory;
            _category       = source.Category;
            _resource       = source.Resource;
            _resource_id    = source.ResourceID;
            _work_report_id = source.WorkReportID;
            _expedient_id   = source.ExpedientID;
        }
 public WorkReportResource NewItem(WorkReport parent, WorkReportResourceInfo item)
 {
     this.NewItem(WorkReportResource.NewChild(parent, item));
     return(this[Count - 1]);
 }