public ViewResult Edit(EmployeeModel employee) { ViewBag.Departments = new SelectList(deptRepository.GetAllDepartments(), "DepartmentID", "Name", employee.DepartmentName); ViewBag.Branches = new SelectList(branchRepository.GetAllBranches(), "BranchID", "Name", employee.AssignedBranchName); ViewBag.Managers = new SelectList(services.GetAllManagers(), "ManagerID", "Name", employee.ManagerName); ViewBag.Designations = new SelectList(desigRepository.GetAllDesignations(), "DesignationID", "Name", employee.DesignationName); return(View(employee)); }
public GameController() { m_gameRepository = new GameRepository(); BranchRepository branchRepo = new BranchRepository(); PriceCategoryRepository priceRepo = new PriceCategoryRepository(); m_branches = branchRepo.GetAllBranches(); m_priceCategories = priceRepo.GetAllPriceCategories(); }
private void LoadBranchesToCombobox() { var branches = BranchRepository.GetAllBranches(); foreach (var branch in branches) { comboBranch.Items.Add($"{branch.Id} - {branch.Name}"); } }
// // GET: /Branch/ public ViewResult List() { return(View(repository.GetAllBranches())); }
// GET: Branch public ActionResult Index() { var branches = m_branchRepository.GetAllBranches(); return(View(branches)); }
public async Task <List <Branch> > GetAllBranches() { List <Branch> list = await _branchRepository.GetAllBranches(); return(list); }