// GET: DashBoard/DashBoard public ActionResult Index() { ViewBag.menu = "inicio"; SessionInitialize(); LocationCAD cadPos = new LocationCAD(); LocationCEN cen = new LocationCEN(cadPos); IList <LocationEN> listLocations = cen.ReadAll(0, -1); ViewBag.numLocations = listLocations.Count; PractitionerCAD cadPrac = new PractitionerCAD(); PractitionerCEN cenPrac = new PractitionerCEN(cadPrac); IList <PractitionerEN> listPracticioners = cenPrac.ReadAll(0, -1); ViewBag.numPractitioners = listPracticioners.Count; PatientCAD cadPatient = new PatientCAD(); PatientCEN cenPatient = new PatientCEN(cadPatient); IList <PatientEN> listPatients = cenPatient.ReadAll(0, -1); ViewBag.numPatients = listPatients.Count; MedicationCAD cadMedication = new MedicationCAD(); MedicationCEN cenMedication = new MedicationCEN(cadMedication); IList <MedicationEN> listMedications = cenMedication.ReadAll(0, -1); ViewBag.numMedications = listMedications.Count; CarePlanCAD cadCarePlan = new CarePlanCAD(); CarePlanCEN cenCarePlan = new CarePlanCEN(cadCarePlan); IList <CarePlanEN> listCarePlans = cenCarePlan.ReadAll(0, -1); ViewBag.numCarePlans = listCarePlans.Count; GoalCAD cadGoal = new GoalCAD(); GoalCEN cenGoal = new GoalCEN(cadGoal); IList <GoalEN> listGoals = cenGoal.ReadAll(0, -1); ViewBag.numGoals = listGoals.Count; SpecialtyCAD cadSpecialty = new SpecialtyCAD(); SpecialtyCEN cenSpecialty = new SpecialtyCEN(cadSpecialty); IList <SpecialtyEN> listSpecialtys = cenSpecialty.ReadAll(0, -1); ViewBag.numSpecialtys = listSpecialtys.Count; EncounterCAD cadEncounter = new EncounterCAD(); EncounterCEN cenEncounter = new EncounterCEN(cadEncounter); IList <EncounterEN> listEncounters = cenEncounter.ReadAll(0, -1); ViewBag.numEncounters = listEncounters.Count; SessionClose(); return(View("~/Areas/DashBoard/Views/Home/DashBoard.cshtml")); }
// GET: DashBoard/Practitioners/Create public ActionResult Create() { ViewBag.menu = "Practitioners"; SpecialtyCAD speCad = new SpecialtyCAD(); SpecialtyCEN speCen = new SpecialtyCEN(speCad); SpecialtyEN speEn = new SpecialtyEN(); speEn.Identifier = 0; speEn.Display = "Ninguna especialidad"; IList <SpecialtyEN> especialidadesBD = speCen.ReadAll(0, -1); especialidadesBD.Insert(0, speEn); var especialidades = especialidadesBD.OrderBy(p => p.Identifier); ViewBag.especialidades = new SelectList(especialidades, "identifier", "display"); return(View()); }
// GET: DashBoard/Practitioners/Edit/5 public ActionResult Edit(int id) { ViewBag.menu = "Practitioners"; PractitionerEN locationEN = null; Practitioner loc = null; try { SessionInitialize(); PractitionerCAD cadPos = new PractitionerCAD(); PractitionerCEN cen = new PractitionerCEN(cadPos); SpecialtyCAD speCad = new SpecialtyCAD(); SpecialtyCEN speCen = new SpecialtyCEN(speCad); SpecialtyEN speEn = new SpecialtyEN(); locationEN = cen.ReadOID(id); loc = new AssemblerPractitioner().ConvertENToModelUI(locationEN); speEn.Identifier = 0; speEn.Display = Administracion.Resources.textos.errorKO; IList <SpecialtyEN> especialidadesBD = speCen.ReadAll(0, -1); especialidadesBD.Insert(0, speEn); var especialidades = especialidadesBD.OrderBy(p => p.Identifier); ViewBag.especialidades = new SelectList(especialidades, "identifier", "display", loc.Especialidad); SessionClose(); } catch (Exception ex) { ViewBag.error = "Error" + ex.Message; } return(View(loc)); }
// GET: DashBoard/Especialidad public ActionResult Index() { IEnumerable <Especialidad> listLoc = null; try { SessionInitialize(); SpecialtyCAD cadSpecialty = new SpecialtyCAD(); SpecialtyCEN cen = new SpecialtyCEN(cadSpecialty); IList <SpecialtyEN> listSpeEn = cen.ReadAll(0, -1); listLoc = new AssemblerEspecialidad().ConvertListENToModel(listSpeEn).ToList(); SessionClose(); } catch (Exception ex) { TempData["resultado"] = Resources.textos.modelEmpty; TempData["ok"] = "warning"; } ViewBag.menu = "Specialities"; return(View(listLoc)); }