Пример #1
0
        public IActionResult Visit(int id)
        {
            ViewBag.var        = id;
            ViewBag.patient    = Properties.patient;
            Properties.VisitId = id;

            var data = VisitTable.GetDataById(id);

            if (data.Count == 0)
            {
                throw new ArgumentNullException();
            }

            Visit visitData = new Visit()
            {
                PatientName = data[0].PatientName,
                DoctorName  = data[0].DoctorName,
                Doctor      = data[0].Doctor,
                Status      = data[0].Status,
                Type        = data[0].Type,
                Date        = data[0].Date
            };

            return(View(visitData));
        }
Пример #2
0
        public IActionResult AddDescription(int id)
        {
            ViewBag.var = id;


            var data     = VisitTable.GetDataById(id);
            var patients = PatientTable.GetPatientById(patientId);

            ViewData["patient"] = patients[0];
            ViewData["visit"]   = data[0];
            return(View());
        }
Пример #3
0
        public IActionResult PdfVisit(int id)
        {
            var visit   = VisitTable.GetDataById(id);
            var patData = PatientTable.GetPatientById(Properties.UserId);

            patData[0].Name = patData[0].Name + " " + patData[0].Surname;
            ViewBag.patient = patData;

            var doc     = DoctorTable.GetDoctorIdByName(visit[0].DoctorName);
            var docData = DoctorTable.GetSpecializationById(doc[0].Id);

            docData[0].Name = docData[0].Name + " " + docData[0].Surname;
            ViewBag.doctor  = docData;

            return(View(visit));
        }
Пример #4
0
        public IActionResult Visit(int id)
        {
            ViewBag.var = id;

            var data = VisitTable.GetDataById(id);

            Visit visitData = new Visit()
            {
                PatientName = data[0].PatientName,
                DoctorName  = data[0].DoctorName,
                Doctor      = data[0].Doctor,
                Status      = data[0].Status,
                Type        = data[0].Type,
                Date        = data[0].Date
            };

            return(View(visitData));
        }