コード例 #1
0
        public JsonResult DatatableBind(string prefix)
        {
            Users Obj_Model = new Models.Keystone.Users();

            Obj_Model.StoreAllUsers = user.SelectAllData();
            List <Users> serch = new List <Users>();

            foreach (DataRow dr in Obj_Model.StoreAllUsers.Tables[0].Rows)
            {
                serch.Add(new Users
                {
                    UserID   = Convert.ToInt32(dr["UserID"]),
                    FullName = dr["FullName"].ToString(),
                });
            }
            return(new JsonResult {
                Data = serch, JsonRequestBehavior = JsonRequestBehavior.AllowGet
            });
        }