예제 #1
0
        // GET: Relation

        public ActionResult Index(long?employeeId)
        {
            RelationCollectionViewModel model = new RelationCollectionViewModel {
                Employees = employeeService.GetAll(),
                Relations = service.GetRelations()
            };

            if (employeeId.HasValue)
            {
                model.Relations = service.GetRelationsByEmployee(employeeId.Value);
            }

            return(View(model));
        }