Example #1
0
        public int AddUpdateUserScheduleResult(UserScheduleResultViewModel model, int LoggedInUserId, int LoggedInOrganizationId)
        {
            UserScheduleResult result = Mapper.Map <UserScheduleResultViewModel, UserScheduleResult>(model);

            if (result.UserScheduleResultId == 0)
            {
                result.OrganizationId = LoggedInOrganizationId;
                base.Insert(result);
            }
            else
            {
                var data = GetSingle(result.UserScheduleResultId, LoggedInUserId, LoggedInOrganizationId);
                data.IsUserAttendedTraining = model.IsUserAttendedTraining;
                data.ReviewerComment        = model.ReviewerComment;
                Update(data);
            }
            this._unitOfWork.Save();
            return(result.UserScheduleResultId);
        }
 public int AddUpdateUserScheduleResult(UserScheduleResultViewModel model)
 {
     return(this._IUserScheduleResultRepository.AddUpdateUserScheduleResult(model, base.UserId, base.OrganizationId));
 }