public ActionResult Create(t_medicalrecords a, HttpPostedFileBase fileId) { if (ModelState.IsValid) { if (fileId != null) { fileId.SaveAs(HttpContext.Server.MapPath("~/Upload/") + fileId.FileName); a.fileAnalysis = fileId.FileName; // } ause.AddMedicalRecords(a); // var path = Path.Combine(Server.MapPath("~/Upload/"), ImageId.FileName); // ImageId.SaveAs(path); return RedirectToAction("Index"); } else { return View(); } }
public void UpdateMedicalRecords(t_medicalrecords a) { utwk.MedicalRecordsRepository.Update(a); utwk.Commit(); }
public void AddMedicalRecords(t_medicalrecords a) { utwk.MedicalRecordsRepository.Add(a); utwk.Commit(); }
public ActionResult Edit(t_medicalrecords m) { if (ModelState.IsValid) { ause.UpdateMedicalRecords(m); return RedirectToAction("Index"); } else { return View(); } }