Ejemplo n.º 1
0
        public IActionResult AddTask()
        {
            TempData["Active"] = "task";

            ViewBag.Priorities = new SelectList(_priorityService.GetAll(), "Id", "Description");
            return(View(new TaskAddViewModel()));
        }
        public IActionResult Index()
        {   //Po utworzeniu userów
            //var user = User.Identity.Name;
            //var modelData = _modelService.GetAll().Where(x => x.UserId == user);
            //Przed utworzeniem userow
            var modelData = _modelService.GetAll();

            return(View(modelData));
        }
Ejemplo n.º 3
0
        private void LoadPriorities()
        {
            cbxSearchByPriority.DataSource    = _priorityService.GetAll();
            cbxSearchByPriority.DisplayMember = "PriorityName";
            cbxSearchByPriority.ValueMember   = "PriorityId";
            cbxSearchByPriority.Text          = "Choose priority";

            cbxPriorityAdd.DataSource    = _priorityService.GetAll();
            cbxPriorityAdd.DisplayMember = "PriorityName";
            cbxPriorityAdd.ValueMember   = "PriorityId";

            cbxPriorityUpdate.DataSource    = _priorityService.GetAll();
            cbxPriorityUpdate.DisplayMember = "PriorityName";
            cbxPriorityUpdate.ValueMember   = "PriorityId";
        }
Ejemplo n.º 4
0
        public IActionResult Create()
        {
            IncidentModel model = new IncidentModel();

            //model.ListPriorites = new SelectList(_modelService.GetAll(), model.Priority);
            //model.ListPriorites = new SelectList(_modelService.GetAll().ToList());
            model.ListPriorities  = new SelectList(_priorityService.GetAll().Select(x => x.Name).ToList(), model.PriorityName);
            model.ListDepartments = new SelectList(_departmentService.GetAll().Select(x => x.Name).ToList(), model.DepartmentName);
            model.ListCategories  = new SelectList(_categoryService.GetAll().Select(x => x.Name).ToList(), model.CategoryName);
            //model.ListPriorities = _priorityService.GetAll().ToList();
            return(View(model));
        }
Ejemplo n.º 5
0
        public IActionResult Index()
        {
            TempData["Active"] = "priority";
            List <Priority> priorities         = _priorityService.GetAll();
            List <PriorityListViewModel> model = new List <PriorityListViewModel>();

            foreach (var item in priorities)
            {
                PriorityListViewModel priorityModel = new PriorityListViewModel();
                priorityModel.Id          = item.Id;
                priorityModel.Description = item.Description;
                model.Add(priorityModel);
            }
            return(View(model));
        }
Ejemplo n.º 6
0
 public IActionResult Index()
 {
     TempData["Active"] = TempDataInfo.Priority;
     return(View(_mapper.Map <List <PriorityListDto> >(_priorityService.GetAll())));
 }
Ejemplo n.º 7
0
 public IHttpActionResult Get()
 {
     return(Ok(_priorityData.GetAll()));
 }
Ejemplo n.º 8
0
 public IActionResult AddWork()
 {
     TempData["Active"] = TempDataInfo.Work;
     ViewBag.Priorities = new SelectList(_priorityService.GetAll(), "Id", "Description");
     return(View(new WorkAddDto()));
 }
Ejemplo n.º 9
0
 public IActionResult AddTask()
 {
     TempData["Active"]   = TempdataInfo.Task;
     ViewBag.PriorityList = new SelectList(_priorityService.GetAll(), "Id", "Definition");
     return(View(new TaskAddDto()));
 }