public ActionResult EditOrCreateArea(int id, string adLoginID) { IntegrationWebSiteMvc.Models.AreaData model = null; IntegrationWebSiteMvc.Models.AreaContext context = new Models.AreaContext(); model = new Models.AreaData(); model.PrimaryAreas = context.PrimaryAreas.ToList(); model.SubAreas = new List<Models.SubArea>(); ViewBag.PrimaryAreas = model.PrimaryAreas; model.ADLoginID = adLoginID; return View(model); }
public ActionResult Areas(string id) { IntegrationWebSiteMvc.Models.AreaData model = null; model = new Models.AreaData(); model.ADLoginID = id; model.SubAreas = _modelContext.GetEmployeeAreas(model.ADLoginID); model.PrimaryAreaName = _modelContext.Employees.Find(id).PrimaryAreaName; ViewBag.PrimaryAreas = new Models.AreaContext().PrimaryAreas.ToList(); return View(model); }