Beispiel #1
0
        private static ActivitySubmission LoadData(ApproveActivityItemDTO data)
        {
            var badgeEntity = new ActivitySubmission
            {
                ActivitySubmissionId   = data.SubmissionId,
                SubmissionStatusId     = (int)data.Status,
                SubmissionApprovedById = data.ApprovedById,
            };

            return(badgeEntity);
        }
        internal ApproveActivityItemDTO Unload()
        {
            using (this.BypassPropertyChecks)
            {
                var returnValue = new ApproveActivityItemDTO
                {
                    SubmissionId        = this.SubmissionId,
                    SubmissionDate      = this.SubmissionDate,
                    ActivityId          = this.ActivityId,
                    ActivityName        = this.ActivityName,
                    ActivityDescription = this.ActivityDescription,
                    SubmissionNotes     = this.SubmissionNotes,
                    EmployeeId          = this.EmployeeId,
                    EmployeeADName      = this.EmployeeADName,
                    EmployeeFirstName   = this.EmployeeFirstName,
                    EmployeeLastName    = this.EmployeeFirstName,
                    Status       = this.Status,
                    ApprovedById = this.ApprovedById,
                };

                var list = new List <ApproveActivityBadgeItemDTO>();
                foreach (var item in this.ApproveActivityBadgeCollection)
                {
                    list.Add(new ApproveActivityBadgeItemDTO()
                    {
                        BadgeId          = item.BadgeId,
                        BadgePriority    = item.BadgePriority,
                        Name             = item.Name,
                        Type             = item.Type,
                        AwardValueAmount = item.AwardValueAmount,
                        ImagePath        = item.ImagePath,
                    });
                }
                returnValue.ApproveActivityBadgeItemCollection = list;

                return(returnValue);
            }
        }
 internal void Load(ApproveActivityItemDTO item)
 {
     using (this.BypassPropertyChecks)
     {
         this.SubmissionId        = item.SubmissionId;
         this.SubmissionDate      = item.SubmissionDate;
         this.ActivityId          = item.ActivityId;
         this.ActivityName        = item.ActivityName;
         this.ActivityDescription = item.ActivityDescription;
         this.SubmissionNotes     = item.SubmissionNotes;
         this.EmployeeId          = item.EmployeeId;
         this.EmployeeADName      = item.EmployeeADName;
         this.EmployeeFirstName   = item.EmployeeFirstName;
         this.EmployeeLastName    = item.EmployeeLastName;
         this.Status       = item.Status;
         this.ApprovedById = item.ApprovedById;
     }
     this.ApproveActivityBadgeCollection = new ApproveActivityBadgeCollection();
     ((ApproveActivityBadgeCollection)this.ApproveActivityBadgeCollection).LoadData(item.ApproveActivityBadgeItemCollection);
     this.MarkClean();
     this.MarkOld();
     this.MarkAsChild();
 }