public ActionResult DischargePatient(DoctorDischargePatient post) { if (post.patientID > 0) { Patient_Doctor_Model patient_doctor_reg = new Patient_Doctor_Model() { ID = DataBase.Session.Load <Patient_Doctor_Model>(post.patientID).ID, DoctorID = Convert.ToInt32(Session["DOCID"]), PatientID = post.patientID, isDischarged = 1, dischargeSlip = post.dischargeSlip }; DataBase.Session.Update(patient_doctor_reg); ViewBag.successMsg = "Patient Successfully Discharged"; } else { ViewBag.successMsg = "PLease Select Patient"; } var list = getPatientList().ToList(); SelectList li = new SelectList(list, "id", "Name"); post.patientList = li; return(View(post)); }
public ActionResult DischargePatient() { DoctorDischargePatient model = new DoctorDischargePatient(); var list = getPatientList().ToList(); SelectList li = new SelectList(list, "id", "Name"); model.patientList = li; return(View(model)); }