コード例 #1
0
        private List <Sector> GetSectors()
        {
            var sectorList = new SectorServices().GetAllOrderedSectors() ?? new List <Sector>();

            if (!sectorList.Any())
            {
                return(new List <Sector>());
            }

            return(sectorList);
        }
コード例 #2
0
        public ViewResult Sectors()
        {
            var sectorList = new SectorServices().GetAllOrderedSectors() ?? new List <Sector>();

            if (!sectorList.Any())
            {
                ViewBag.Title = "Sector Set Up";
                return(View(sectorList));
            }
            sectorList.Remove(sectorList.Find(m => m.SectorId == (int)OtherNotAvailable.Not_Available));
            ViewBag.Title = "Manage Sectors";
            return(View(sectorList));
        }