// GET : Create public ActionResult Create() { UserViewModel model = EmployeeRepo.GetIdByName(User.Identity.Name); ViewBag.Company = new SelectList(CompanyRepo.Get(), "id", "Name"); return(PartialView("_Create", new EmployeeViewModel())); }
// GET: User public ActionResult Index() { ViewBag.Employee = new SelectList(EmployeeRepo.Get(), "FullName", "FullName"); ViewBag.Role = new SelectList(RoleRepo.Get(), "Name", "Name"); ViewBag.Company = new SelectList(CompanyRepo.Get(), "Name", "Name"); return(View(UserRepo.Get())); }
//GET : Edit public ActionResult Edit(int id) { //UserViewModel model2 = EmployeeRepo.GetIdByName(User.Identity.Name); ViewBag.Company = new SelectList(CompanyRepo.Get(), "id", "Name"); EmployeeViewModel model = EmployeeRepo.GetById(id); return(PartialView("_Edit", model)); }
public Company Get(int id) { try { return(_repo.Get(id)); } catch (Exception ex) { _logger.Error(String.Format("Error during CompanyService.Get({0})", id), ex); throw; } }
// GET: Employee public ActionResult Index() { ViewBag.CompanyName = new SelectList(CompanyRepo.Get(), "Name", "Name"); return(View(EmployeeRepo.Get())); }
public ActionResult List() { return(PartialView("_List", CompanyRepo.Get())); }
// GET: Company public ActionResult Index() { ViewBag.Company = new SelectList(CompanyRepo.Get(), "Code", "Code"); ViewBag.Company1 = new SelectList(CompanyRepo.Get(), "Name", "Name"); return(View(CompanyRepo.Get())); }