Esempio n. 1
0
        public IEnumerable <PermissionModel> GetDefaultPermissions()
        {
            var availablePermissions = _permissionTypeService.GetAll();
            IEnumerable <PermissionModel> permissionModels = availablePermissions.Where(p => p.Id != Permissions.View).Select(p => new PermissionModel(p));

            return(permissionModels);
        }
        private void DropBoxItem()
        {
            var permissionTypeGrp      = _permissionTypeService.GetAll().Data;
            var reasonForPermissionGrp = _reasonForPermissionService.GetAll().Data;

            ViewBag.PermissionTypeGrpList      = new SelectList(permissionTypeGrp, "IzinTurId", "IzinTuru");
            ViewBag.ReasonForPermissionGrpList = new SelectList(reasonForPermissionGrp, "IzinNedenId", "IzinNedeni");
        }
        // GET: PermissionTypes
        public ActionResult Index()
        {
            var permissionType = Mapper.Map <IEnumerable <PermissionTypeViewModel> >(permissionTypeService.GetAll());

            return(View(permissionType));
        }
Esempio n. 4
0
 // GET: Permissions/Create
 public ActionResult Create()
 {
     ViewBag.PermissionTypeId = new SelectList(permissionTypeService.GetAll(), "Id", "Name");
     ViewBag.EmployeeId       = new SelectList(employeeService.GetAll(), "Id", "FullName");
     return(View());
 }
        public ActionResult PermissionTypeGetAll()
        {
            var result = _permissionTypeService.GetAll().Data.ToList();

            return(View("PermissionTypeGetAll", result));
        }