Beispiel #1
0
        public ActionResult EditSpecialty(int id)
        {
            var specialty     = _specialty.GetById(id);
            var editSpecialty = new EditSpecialty
            {
                Id           = specialty.Id,
                Number       = specialty.Number,
                Name         = specialty.Name,
                Description  = specialty.Description,
                Photo        = specialty.Photo,
                FacultyId    = specialty.FacultyId,
                BudgetPlaces = specialty.BudgetPlaces,
                TotalPlaces  = specialty.TotalPlaces
            };

            return(View(editSpecialty));
        }
        private Appointment GetFullInformation(Appointment appointment)
        {
            var fullAppointment = new Appointment()
            {
                Id          = appointment.Id,
                Date        = appointment.Date,
                Location    = appointment.Location,
                PatientId   = appointment.PatientId,
                SpecialtyId = appointment.SpecialtyId,
                Patient     = _patientService.GetById(appointment.PatientId),
                Specialty   = _specialtyService.GetById(appointment.SpecialtyId)
            };

            return(fullAppointment);
        }
Beispiel #3
0
        public ActionResult Specialty(int id)
        {
            var specialty = _specialty.GetById(id);
            DisplaySpecialty displaySpecialty = new DisplaySpecialty
            {
                Id           = specialty.Id,
                Name         = specialty.Name,
                Description  = specialty.Description,
                FacultyId    = specialty.FacultyId,
                Number       = string.Format("{0:d3}", specialty.Number),
                BudgetPlaces = specialty.BudgetPlaces,
                TotalPlaces  = specialty.TotalPlaces
            };

            return(View(displaySpecialty));
        }