public JsonResult Active(int?id) { var dao = new UsersDAO(); if (dao.Active(id)) { List <User> users = db.Users.Where(n => n.user_bin == false).OrderBy(n => n.user_name).ToList(); List <jUsers> list = users.Select(n => new jUsers { user_active = n.user_active, user_bin = n.user_bin, user_code = n.user_code, user_datecreate = n.user_datecreate.Value.ToString("dd/MM/yyyy"), user_datelogin = n.user_datelogin.Value.ToString("dd/MM/yyyy"), user_deadline = n.user_deadline.Value.ToString("dd/MM/yyyy"), user_email = n.user_email, user_id = n.user_id, user_img = n.user_img, user_name = n.user_name, user_option = n.user_option, user_pass = n.user_pass, user_point = n.user_point, user_token = n.user_token }).ToList(); return(Json(list, JsonRequestBehavior.AllowGet)); } else { return(Json(null)); } }