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

            return(badgeEntity);
        }
예제 #3
0
 public void Delete(int activitySubmissionId)
 {
     using (var ctx = new Entities())
     {
         ctx.Database.Connection.Open();
         var deleteActivitySubmission = new ActivitySubmission
         {
             ActivitySubmissionId = activitySubmissionId
         };
         ctx.ActivitySubmissions.Attach(deleteActivitySubmission);
         ctx.ActivitySubmissions.Remove(deleteActivitySubmission);
         ctx.SaveChanges();
     }
 }
 private static ActivitySubmission LoadData(SubmitActivityDTO data)
 {
     var activitySubmission = new ActivitySubmission
     {
         ActivitySubmissionId = data.Id,
         ActivityId = data.ActivityId,
         EmployeeId = data.EmployeeId,
         SubmissionStatusId = (int)data.Status,
         SubmissionApprovedById = data.ApprovedById == 0 ? null : (int?)data.ApprovedById,
         SubmissionDate = data.ActivitySubmissionDate,
         SubmissionDescription = data.Notes
     };
     return activitySubmission;
 }
예제 #5
0
        private static ActivitySubmission LoadData(SubmitActivityDTO data)
        {
            var activitySubmission = new ActivitySubmission
            {
                ActivitySubmissionId   = data.Id,
                ActivityId             = data.ActivityId,
                EmployeeId             = data.EmployeeId,
                SubmissionStatusId     = (int)data.Status,
                SubmissionApprovedById = data.ApprovedById == 0 ? null : (int?)data.ApprovedById,
                SubmissionDate         = data.ActivitySubmissionDate,
                SubmissionDescription  = data.Notes,
                AwardValue             = data.AwardValue
            };

            return(activitySubmission);
        }
 public void Delete(int activitySubmissionId)
 {
     using (var ctx = new Entities())
     {
         ctx.Database.Connection.Open();
         var deleteActivitySubmission = new ActivitySubmission
         {
             ActivitySubmissionId = activitySubmissionId
         };
         ctx.ActivitySubmissions.Attach(deleteActivitySubmission);
         ctx.ActivitySubmissions.Remove(deleteActivitySubmission);
         ctx.SaveChanges();
     }
 }