示例#1
0
        // GET: PGBedPatientInfoes/Create
        public ActionResult Create(int?id)
        {
            PGBedPatientInfo mdl = new PGBedPatientInfo();

            mdl.BedID = id.Value;
            return(View(mdl));
        }
示例#2
0
        public ActionResult DeleteConfirmed(int id)
        {
            PGBedPatientInfo pGBedPatientInfo = db.PgBedPatientInfo.Find(id);

            db.PgBedPatientInfo.Remove(pGBedPatientInfo);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
示例#3
0
 public ActionResult Edit([Bind(Include = "PGBedPatientId,PatientName,PatientPhone,PatientAddress,State,District,City,Pincode,PatientIdTypeValue,PatientStatus,Notes,PatientAdmittedOnDate,PatientDischargedOnDate,BedID")] PGBedPatientInfo pGBedPatientInfo)
 {
     if (ModelState.IsValid)
     {
         db.Entry(pGBedPatientInfo).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index", new { bedId = pGBedPatientInfo.BedID }));
     }
     return(View(pGBedPatientInfo));
 }
        public ActionResult CreatePatient([Bind(Include = "PGBedPatientId,PatientName,PatientPhone,PatientAddress,State,District,City,Pincode,PatientIdTypeValue,PatientStatus,Notes,PatientAdmittedOnDate,PatientDischargedOnDate")] PGBedPatientInfo patientInfo)
        {
            if (ModelState.IsValid)
            {
                db.PgBedPatientInfo.Add(patientInfo);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(patientInfo));
        }
示例#5
0
        public ActionResult Create([Bind(Include = "PGBedPatientId,PatientName,PatientPhone,PatientAddress,State,District,City,Pincode,PatientIdTypeValue,PatientStatus,Notes,PatientAdmittedOnDate,PatientDischargedOnDate,BedID")] PGBedPatientInfo pGBedPatientInfo)
        {
            if (ModelState.IsValid)
            {
                var bed = db.PgBeds.FirstOrDefault(x => x.BedID == pGBedPatientInfo.BedID);
                pGBedPatientInfo.PgBed = bed;
                db.PgBedPatientInfo.Add(pGBedPatientInfo);
                db.SaveChanges();
                return(RedirectToAction("Index", "PGRegistrations"));
            }

            return(View(pGBedPatientInfo));
        }
示例#6
0
        // GET: PGBedPatientInfoes/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            PGBedPatientInfo pGBedPatientInfo = db.PgBedPatientInfo.Find(id);

            if (pGBedPatientInfo == null)
            {
                return(HttpNotFound());
            }
            return(View(pGBedPatientInfo));
        }