// GET: MGEmployees/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            IPrepareExtendedView <List <SurveyDisplay>, int?> modelExtendedLoader = new PrepareSurveyView <List <SurveyDisplay>, int?>();

            modelExtendedLoader.Parameters = id;
            return(View(modelExtendedLoader.GetView(_db)));
        }
Beispiel #2
0
        // GET: Surveys
        public ActionResult Index()
        {
            var             userId    = User.Identity.GetUserId();
            List <Employee> employees = _db.T_Employees.Where(i => i.UserId == userId).ToList();

            int employeeId = 0;

            if (employees.Count > 0)
            {
                employeeId = employees[0].Id;
            }

            IPrepareExtendedView <List <SurveyDisplay>, int?> modelExtendedLoader = new PrepareSurveyView <List <SurveyDisplay>, int?>();

            modelExtendedLoader.Parameters = employeeId;
            return(View(modelExtendedLoader.GetView(_db)));
        }