public string Delete(int id)
        {
            var listZoneLocactions = _tmsZoneLocactionRespository.Find(x => x.JobSiteId == id && x.DeleteFlag != DeleteFlg.Delete);

            if (listZoneLocactions.Count() > 0)
            {
                return(MessageStatic.HaveChild);
            }

            var listAllowanceJobsites = _tmsAllowanceJobsiteRepository.Find(x => x.JobsiteId == id && x.DeleteFlag != DeleteFlg.Delete);

            if (listAllowanceJobsites.Count() > 0)
            {
                return(MessageStatic.HaveChild);
            }

            var listOtSettings = _tmsAllowanceJobsiteRepository.Find(x => x.JobsiteId == id && x.DeleteFlag != DeleteFlg.Delete);

            if (listOtSettings.Count() > 0)
            {
                return(MessageStatic.HaveChild);
            }

            var listShiftJobSites = _tmsShiftJobSiteRepository.Find(x => x.JobSiteId == id && x.DeleteFlag != DeleteFlg.Delete);

            if (listShiftJobSites.Count() > 0)
            {
                return(MessageStatic.HaveChild);
            }

            _iTMSJobSiteRepository.Remove(id);
            SaveChanges();
            return("");
        }
        public string Delete(int id)
        {
            var listAllowanceJobSites = _tmsAllowanceJobSiteRepository.Find(x => x.AllowanceCompanyId == id);

            if (listAllowanceJobSites.Count() > 0)
            {
                return(MessageStatic.HaveChild);
            }
            _tmsAllowanceRepository.Remove(id);
            SaveChanges();
            return("");
        }
        public List <TMSAllowanceJobsiteViewModel> GetAll()
        {
            var data = _tmsAllowanceJobsiteRepository.Find(x => x.DeleteFlag != DeleteFlg.Delete).ToList();

            return(_mapper.Map <List <TMSAllowanceJobsite>, List <TMSAllowanceJobsiteViewModel> >(data));
        }