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)); }
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"; }
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)); }
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)); }
public IActionResult Index() { TempData["Active"] = TempDataInfo.Priority; return(View(_mapper.Map <List <PriorityListDto> >(_priorityService.GetAll()))); }
public IHttpActionResult Get() { return(Ok(_priorityData.GetAll())); }
public IActionResult AddWork() { TempData["Active"] = TempDataInfo.Work; ViewBag.Priorities = new SelectList(_priorityService.GetAll(), "Id", "Description"); return(View(new WorkAddDto())); }
public IActionResult AddTask() { TempData["Active"] = TempdataInfo.Task; ViewBag.PriorityList = new SelectList(_priorityService.GetAll(), "Id", "Definition"); return(View(new TaskAddDto())); }