public ActionResult Create([Bind(Include = "Patient_Id,Patient_Name,Patient_Age,Patient_Code,Patient_Password,Patient_ID_NO,Patient_Address,Patient_ContactNO,Patient_DOB,Patien_Surname,Patient_Image,Patient_Email")] tblPatient tblPatient) { if (ModelState.IsValid) { db.tblPatients.Add(tblPatient); db.SaveChanges(); return(RedirectToAction("Login", "Login")); } return(View(tblPatient)); }
public ActionResult Create([Bind(Include = "Doctor_Id,Doctor_Name,Doctor_Surname,Doctor_Email,Doctor_ContactNO,Doctor_ID_NO,Doctor_Type,Doctor_Image,Doctor_Code")] tblDoctor tblDoctor) { if (ModelState.IsValid) { db.tblDoctors.Add(tblDoctor); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tblDoctor)); }
public ActionResult Create([Bind(Include = "Bill_Id,Bill_Date,Appointment_Code,Bill_Code,Patient_Code")] tblInvoice tblInvoice) { if (ModelState.IsValid) { db.tblInvoices.Add(tblInvoice); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.Appointment_Code = new SelectList(db.tblAppointments, "Appointment_Code", "Appointment_Code", tblInvoice.Appointment_Code); ViewBag.Patient_Code = new SelectList(db.tblPatients, "Patient_Code", "Patient_Name", tblInvoice.Patient_Code); return(View(tblInvoice)); }
public ActionResult Create([Bind(Include = "Appointment_Id,Appointment_Date,Appointment_Time,Appointment_Type,Doctor_Code,Patient_Code,Appointment_Room,Appointment_Code,Status")] tblAppointment tblAppointment) { if (ModelState.IsValid) { tblAppointment.Status = "Pending"; db.tblAppointments.Add(tblAppointment); db.SaveChanges(); return(RedirectToAction("Index", "AppointmentHome")); } ViewBag.Doctor_Code = new SelectList(db.tblDoctors, "Doctor_Code", "Doctor_Name", tblAppointment.Doctor_Code); ViewBag.Patient_Code = new SelectList(db.tblPatients, "Patient_Code", "Patient_Name", tblAppointment.Patient_Code); return(View(tblAppointment)); }