public ActionResult Accounting() { var model = new AccountingModel(); var branches = BranchServices.GetAllBranches(); foreach (var item in branches) { model.Branches.Add(new SelectListItem { Text = item.BranchName, Value = item.Id.ToString() }); } return(View(model)); }
public ActionResult Register() { UserModel model = new UserModel(); var branches = BranchServices.GetAllBranches(); foreach (var item in branches) { model.Branches.Add(new SelectListItem { Text = item.BranchName, Value = item.Id.ToString() }); } var Genders = GenderServices.GetAll(); foreach (var item in Genders) { model.Genders.Add(new SelectListItem { Text = item.GenderDescription, Value = item.Id.ToString() }); } var UserTypes = UserServices.GetAllUserTypes(); foreach (var item in UserTypes) { model.UserTypes.Add(new SelectListItem { Text = item.TypeDescription, Value = item.Id.ToString() }); } return(View("RegisterEmployee", model)); }
// GET: Branches public async Task <IActionResult> Index() { return(View(await _service.GetAllBranches())); }