// GET: Doctor/Create public ActionResult AddDoctor(int?Doctor_id) { var lstQualification = db.tblEmployeeQualifications.Where(x => x.employee_type == 1).ToList(); ViewBag.lstQualification = lstQualification; var status = db.tblEmployeeSatus.ToList(); ViewBag.status = status; var designation = db.tblEmpDesignations.ToList(); var model = new tblEmployee(); if (Doctor_id != null) { model = new DoctorsDAL().SingleRecord(Convert.ToInt32(Doctor_id)); // designation = designation.Where(x => x.Qualification_id == model.Qualification_id).ToList(); ViewBag.gender = model.Gender; if (model.Image != null && model.Image != "") { ViewData["image"] = model.Image; } } ViewBag.designation = designation; return(View(model)); }
public ActionResult DoctorList() { var list = new DoctorsDAL().ListOfRecords(); ViewData["listOfData"] = list; return(View()); }
public ActionResult PatientList() { var model = new PatientDAL().ListOfRecords().Where(x => x.is_active == true).ToList(); var lstDoctors = new DoctorsDAL().ListOfRecords().Where(x => x.EmployeeTypeID == 1).ToList(); ViewBag.doctors = lstDoctors; ViewData["GetPatientList"] = model; return(View()); }
protected void DrpDoctorSelect_SelectedIndexChanged(object sender, EventArgs e) { if (DrpDoctorSelect.SelectedValue != null && DrpDoctorSelect.SelectedValue != "") { int selectedValue = Convert.ToInt32(DrpDoctorSelect.SelectedValue); // Sloppiness borne of time deficiency, should not have to hit database twice to get Doctor object var selectedDoctor = new DoctorsDAL().getDoctors().First(d => d.Id.Equals(selectedValue)); if (selectedDoctor.PatientsInCare >= BusinessRuleMagic.MaxTreatments) BtnInPatient.Enabled = false; else (BtnInPatient.Enabled) = true; } }
public ActionResult getDesignationByQulif_id(string qualification_id) { var lstDesignation = new DoctorsDAL().DesignationbyQualification(Convert.ToInt32(qualification_id)).ToList(); var jsonResult = Json((new { Success = "true", Data = new { lstDesignation = lstDesignation } }), JsonRequestBehavior.AllowGet); jsonResult.MaxJsonLength = int.MaxValue; return(jsonResult); }