public ActionResult Doctor() { Doctor obj_Module = new Models.Master.Doctor(); obj_Module.StoreAllDoctor = Bl_Doctor.SelectAllData(); return(View(obj_Module)); }
public JsonResult DataTableBind() { Doctor obj_Module = new Models.Master.Doctor(); obj_Module.StoreAllDoctor = Bl_Doctor.SelectAllData(); List <Doctor> serch = new List <Doctor>(); foreach (DataRow dr in obj_Module.StoreAllDoctor.Tables[0].Rows) { serch.Add(new Doctor { DoctorID = Convert.ToInt32(dr["DoctorID"]), DoctorFName = dr["DoctorFName"].ToString(), DoctorLName = dr["DoctorLName"].ToString(), DoctorType = dr["DoctorType"].ToString(), DoctorImage = MimeMapping.GetMimeMapping(dr["DoctorImage"].ToString()), }); } return(new JsonResult { Data = serch, JsonRequestBehavior = JsonRequestBehavior.AllowGet }); }