public ActionResult Index() { var userId = User.Identity.GetUserName(); if (userRoleRepository.GetRoleByUserName(userId) != null) { List <FloorsModel> floors = floorRepository.GetAllFloors(); return(View("Index", floors)); } else { return(RedirectToAction("Contact", "Home")); } }
public List <Floor> GetListOFAllFloors() { var floorList = new List <Floor>(); var floorEntityList = _floorRepository.GetAllFloors(); floorList = Mapper.Map <List <Floor> >(floorEntityList); return(floorList); }
public ActionResult FloorInfo(List <FloorModel> floorModelList) { FloorModel floorModel = new FloorModel(); var bllFloorModel = ConvertToBLL(floorModel); var entityFloorModel = ConvertFromBLLToRepo(bllFloorModel); List <FloorModel> floorUIList = new List <FloorModel>(); List <Floor> bllFloorList = floorUIList.ConvertAll(x => bllFloorModel); List <FloorEntity> repoFloorList = bllFloorList.ConvertAll(x => entityFloorModel); floorEntity.GetAllFloors(); return(View("FloorInfo", floorModelList)); }