Пример #1
0
 public BiopsyIndexViewModel BiopsyToIndexModel(Biopsy biopsy)
 {
     return new BiopsyIndexViewModel()
     {
         Id = biopsy.Id,
         PatientId = biopsy.PatientId
     };
 }
Пример #2
0
        public async Task<ActionResult> Create([Bind(Include = "Id,PatientId")] BiopsyCreateModel biopsyModel)
        {
            if (ModelState.IsValid)
            {
                var biopsy = new Biopsy()
                {
                    Id = biopsyModel.Id,
                    PatientId = biopsyModel.PatientId
                };
                await _biopsyStore.AddBiopsyAsync(biopsy);
                return RedirectToAction("Index");
            }

            SetPatientsOnModel(biopsyModel);
            return View(biopsyModel);
        }
Пример #3
0
 private SelectListItem BiopsyToSelectListItem(Biopsy biopsy)
 {
     return new SelectListItem() { Value = biopsy.Id, Text = biopsy.Id + (biopsy.PatientId ?? string.Empty) };
 }