public IHttpActionResult PutDokter(string id, Dokter dokter) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != dokter.NPA) { return(BadRequest()); } db.Entry(dokter).State = EntityState.Modified; try { db.SaveChanges(); } catch (DbUpdateConcurrencyException) { if (!DokterExists(id)) { return(NotFound()); } else { throw; } } return(StatusCode(HttpStatusCode.NoContent)); }
public IHttpActionResult PutAdmin(string id, Admin admin) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != admin.NIP) { return(BadRequest()); } db.Entry(admin).State = EntityState.Modified; try { db.SaveChanges(); } catch (DbUpdateConcurrencyException) { if (!AdminExists(id)) { return(NotFound()); } else { throw; } } return(StatusCode(HttpStatusCode.NoContent)); }
public IHttpActionResult PutLayananR(string id, LayananR layananR) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != layananR.IdLayananRS) { return(BadRequest()); } db.Entry(layananR).State = EntityState.Modified; try { db.SaveChanges(); } catch (DbUpdateConcurrencyException) { if (!LayananRExists(id)) { return(NotFound()); } else { throw; } } return(StatusCode(HttpStatusCode.NoContent)); }
public IHttpActionResult PutJadwalLayanan(string id, JadwalLayanan jadwalLayanan) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != jadwalLayanan.IdJadwal) { return(BadRequest()); } db.Entry(jadwalLayanan).State = EntityState.Modified; try { db.SaveChanges(); } catch (DbUpdateConcurrencyException) { if (!JadwalLayananExists(id)) { return(NotFound()); } else { throw; } } return(StatusCode(HttpStatusCode.NoContent)); }
public IHttpActionResult PutRumahSakit(string id, RumahSakit rumahSakit) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (id != rumahSakit.IdRS) { return(BadRequest()); } db.Entry(rumahSakit).State = EntityState.Modified; try { db.SaveChanges(); } catch (DbUpdateConcurrencyException) { if (!RumahSakitExists(id)) { return(NotFound()); } else { throw; } } return(StatusCode(HttpStatusCode.NoContent)); }
public ActionResult Edit([Bind(Include = "IdRS,NamaRS,JenisRS,KelasRS,Deskripsi,Visi,Misi,Direktur,Alamat,Penyelenggara,Website,Kota,KodePos,Telephone,Fax,ImageUrl,IdAdmin")] RumahSakit rumahSakit) { if (ModelState.IsValid) { db.Entry(rumahSakit).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.IdAdmin = new SelectList(db.Admins, "NIP", "Nama", rumahSakit.IdAdmin); return(View(rumahSakit)); }
public ActionResult Edit([Bind(Include = "NIK,Nama,Alamat,TanggalLahir,KotaLahir,Email,JenisKelamin,Pekerjaan,StatusPernikahan,Agama,Password,ImageUrl")] Pasien pasien) { if (ModelState.IsValid) { db.Entry(pasien).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.Agama = new SelectList(db.Agamas, "Id", "Nama", pasien.Agama); return(View(pasien)); }
public ActionResult Edit([Bind(Include = "IdLayanan,IdRS,IdLayananRS")] LayananR layananR) { if (ModelState.IsValid) { db.Entry(layananR).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.IdLayanan = new SelectList(db.JenisLayanans, "IdLayanan", "JenisLayanan1", layananR.IdLayanan); ViewBag.IdRS = new SelectList(db.RumahSakits, "IdRS", "NamaRS", layananR.IdRS); return(View(layananR)); }
public ActionResult Edit([Bind(Include = "NIK,NPA,Chat,DateTime")] Konsultasi konsultasi) { if (ModelState.IsValid) { db.Entry(konsultasi).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.NPA = new SelectList(db.Dokters, "NPA", "Nama", konsultasi.NPA); ViewBag.NIK = new SelectList(db.Pasiens, "NIK", "Nama", konsultasi.NIK); return(View(konsultasi)); }
public ActionResult Edit([Bind(Include = "NPA,Nama,JenisKelamin,TanggalLahir,KotaLahir,Email,Alamat,Password,IdSpesialis,Agama,ImageUrl")] Dokter dokter) { if (ModelState.IsValid) { db.Entry(dokter).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.Agama = new SelectList(db.Agamas, "Id", "Nama", dokter.Agama); ViewBag.IdSpesialis = new SelectList(db.Spesialis, "IdSpesialis", "NamaSpesialis", dokter.IdSpesialis); return(View(dokter)); }
public ActionResult Edit([Bind(Include = "id,NIK,NoAntrian,TanggalDaftar,IdLayananRS")] Antrian antrian) { if (ModelState.IsValid) { db.Entry(antrian).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.IdLayananRS = new SelectList(db.LayananRS, "IdLayananRS", "IdLayanan", antrian.IdLayananRS); ViewBag.NIK = new SelectList(db.Pasiens, "NIK", "Nama", antrian.NIK); return(View(antrian)); }