private static ActivitySubmission LoadData(ApproveActivityItemDTO data) { var badgeEntity = new ActivitySubmission { ActivitySubmissionId = data.SubmissionId, SubmissionStatusId = (int)data.Status }; return badgeEntity; }
private static ActivitySubmission LoadData(ApproveActivityItemDTO data) { var badgeEntity = new ActivitySubmission { ActivitySubmissionId = data.SubmissionId, SubmissionStatusId = (int)data.Status, SubmissionApprovedById = data.ApprovedById, }; return(badgeEntity); }
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; }
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); }