示例#1
0
        internal string Delete(int id)
        {
            var data = GetById(id);

            _repo.Delete(id);
            return("Deleted");
        }
示例#2
0
        internal string Delete(int id)
        {
            var data = Get(id);

            _repo.Delete(id);
            return("Deleted Job");
        }
示例#3
0
        internal JobListing Delete(int id)
        {
            JobListing original = Get(id);

            _repo.Delete(id);
            return(original);
        }
示例#4
0
        internal Job Delete(int id)
        {
            Job original = GetById(id);

            _repo.Delete(id);
            return(original);
        }
示例#5
0
        internal String Delete(int id)
        {
            // NOTE: Why do we declare data? We don't use it...
            Job data = GetById(id);

            _repo.Delete(id);
            return("delorted");
        }
示例#6
0
        internal string Delete(int id)
        {
            var original = GetById(id);

            if (original == null)
            {
                throw new Exception("Invalid Delete Permissions");
            }
            _repo.Delete(id);
            return("DELETED");
        }
示例#7
0
        internal string Delete(int id, string userId)
        {
            var original = GetById(id);

            if (original.CreatorId != userId)
            {
                throw new Exception("Invalid Delete Permissions");
            }
            _repo.Delete(id);
            return("delorted");
        }
        internal String Delete(int id, Profile userInfo)
        {
            var data = GetById(id, userInfo);

            if (data.CreatorId != userInfo.Id)
            {
                throw new Exception("Invalid Permissions to Delete");
            }
            _repo.Delete(id);
            return("Successfully Deleted!");
        }
示例#9
0
        public bool Delete(int id, string userId)
        {
            var data = FindById(id);

            if (data.CreatorId != userId)
            {
                throw new System.Exception("Invalid Edit Permissions");
            }
            _repo.Delete(id);
            return(true);
        }
示例#10
0
        public IHttpActionResult DeleteJob(long id)
        {
            Job job = jobs.Get(id);

            if (job == null)
            {
                return(NotFound());
            }
            jobs.Delete(id);

            return(Ok(job));
        }
示例#11
0
        internal string Delete(int id, string userId)
        {
            var data = GetById(id);

            if (data.CreatorId != userId)
            {
                throw new Exception("Invalid Delete Permissions");
            }

            _repo.Delete(id);
            return("DELETED");
        }
        internal string Delete(int id, string userId)
        {
            Job foundJob = GetById(id);

            if (foundJob.UserId != userId)
            {
                throw new Exception("This is not your job!");
            }
            if (_repo.Delete(id, userId))
            {
                return("Sucessfully delorted.");
            }
            throw new Exception("Somethin bad happened");
        }
示例#13
0
 internal string Delete(int id)
 {
     Get(id);
     _repo.Delete(id);
     return("deleted");
 }
示例#14
0
 internal string Delete(int id)
 {
     Get(id);
     _jrepo.Delete(id);
     return("Successfully Delorted");
 }
示例#15
0
 internal string Delete(int id, string userId)
 {
     GetById(id);
     _jrepo.Delete(id, userId);
     return("Job Deleted");
 }
 public string Delete(int id)
 {
     _repo.Delete(id);
     return("Successfully Deleted");
 }
示例#17
0
 internal string Delete(int id)
 {
     getByID(id);
     _repo.Delete(id);
     return("Successfully Deleted");
 }
示例#18
0
 internal string Delete(int id)
 {
     GetById(id);
     _jobsRepository.Delete(id);
     return("Successfully Deleted");
 }