public ActionResult EmployeeRegistration() { var userId = WebSecurity.CurrentUserId; var officelist = _officeRepository.GetAllByOfficeOwnerId(userId); return View(officelist); }
public List <OfficeViewModel> GetAllOfficeInfos(int officeOwnerId) { var officeInfos = new List <OfficeViewModel>(); var showOfficeList = OfficeRepository.GetAllByOfficeOwnerId(officeOwnerId); foreach (var officeList in showOfficeList) { var employeeCount = EmployeeRepository.GetEmployeeCount(officeList.Id); officeInfos.Add(new OfficeViewModel() { OfficeName = officeList.OfficeName, EmployeeCount = employeeCount, OfficeId = officeList.Id }); } return(officeInfos); }
public ActionResult Register() { var officeOwnerId = WebSecurity.CurrentUserId; return(View(_officeRepository.GetAllByOfficeOwnerId(officeOwnerId))); }