예제 #1
0
 public string FillReport(int id, FillReportViewModel fillreport)
 {
     if (ModelState.IsValid)
     {
         PacsReport report      = db.PacsReports.Find(id);
         var        currentUser = db.Users.Find(User.Identity.GetUserId());
         report.ReportUser  = currentUser;
         report.ReportDate  = DateTime.Now;
         report.ReportState = ReportStateEnum.rsFilledReport;
         //db.Entry(currentUser).State = EntityState.Unchanged;
         db.Entry(report).State = EntityState.Modified;
         db.SaveChanges();
         return("保存成功");
     }
     return("保存失败");
 }
예제 #2
0
        public ActionResult FillReport(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            PacsReport pacsReport = db.PacsReports.Find(id);

            if (pacsReport == null)
            {
                return(HttpNotFound());
            }
            FillReportViewModel report = new FillReportViewModel();

            report.ImageDesc        = pacsReport.ImageDesc;
            report.ImagingDiagnosis = pacsReport.ImagingDiagnosis;
            return(View(report));
        }