// GET: AdapterBasic
        public ActionResult Index()
        {
            IEnumerable <AdapterBasicDTO> adaptersList = _repo.GetAll();

            SetAdapterType();
            return(View(adaptersList));
        }
Beispiel #2
0
        private List <AdapterTypeViewModel> GetAdapterTypes()
        {
            var types = _adapterTypesRepo.GetAll().Select(x => new AdapterTypeViewModel()
            {
                Id          = x.Id,
                AdapterType = x.AdapterType
            }).ToList();

            return(types);
        }
Beispiel #3
0
        // GET: AdapterBasic2
        public ActionResult Index()
        {
            List <AdapterTypeViewModel> adaptersTypeList = _adapterTypesRepo.GetAll().Select(x => new AdapterTypeViewModel()
            {
                Id          = x.Id,
                AdapterType = x.AdapterType
            }).ToList();

            return(View(adaptersTypeList));
        }
Beispiel #4
0
        // GET: AdapterType
        public ActionResult Index()
        {
            var list = _repo.GetAll().Select(x => new AdapterTypeViewModel()
            {
                AdapterType = x.AdapterType + " (View Model)",
                Id          = x.Id
            });

            return(View(list));
        }
Beispiel #5
0
        //private void SetAdapterType2(int? adapterTypeId = null)
        //{
        //    var types = _adapterTypesRepo.GetAll();

        //    ViewBag.AdapterTypes = adapterTypeId != null ?
        //        new SelectList(types, "Id", "AdapterType", adapterTypeId) :
        //        new SelectList(types, "Id", "AdapterType");
        //}

        // GET: AdapterBasic

        public ActionResult Index()
        {
            IEnumerable <AdapterBasicViewModel> adaptersList = _repo.GetAll().Select(x => new AdapterBasicViewModel()
            {
                Id               = x.Id,
                AdapterName      = x.AdapterName,
                AdapterTypeId    = x.AdapterTypeId,
                IsActive         = x.IsActive,
                ModifiedDate     = x.ModifiedDate,
                RegistrationDate = x.RegistrationDate,
                AdapterTypeList  = GetAdapterTypes()
            });

            return(View(adaptersList));
        }
        private void SetAdapterType()
        {
            var types = _adapterTypesRepo.GetAll();

            ViewBag.AdapterTypes = types;
        }