Esempio n. 1
0
        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));
        }
Esempio n. 2
0
        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));
        }
Esempio n. 3
0
 // GET: Branches
 public async Task <IActionResult> Index()
 {
     return(View(await _service.GetAllBranches()));
 }