示例#1
0
        public ActionResult Doctor()
        {
            Doctor obj_Module = new Models.Master.Doctor();

            obj_Module.StoreAllDoctor = Bl_Doctor.SelectAllData();
            return(View(obj_Module));
        }
示例#2
0
        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
            });
        }