示例#1
0
        internal Job EditOne(Job editJob)
        {
            Job current = GetOne(editJob.Id);

            if (current == null)
            {
                throw new SystemException("Invalid Id");
            }
            else
            {
                editJob.Budget   = editJob.Budget != null ? editJob.Budget : current.Budget;
                editJob.Location = editJob.Location != null ? editJob.Location : current.Location;
                editJob.Name     = editJob.Name != null ? editJob.Name : current.Name;
                return(_jrepo.EditOne(editJob));
            }
        }