//
        // GET: /Home/

        /// <summary>
        /// Logins the specified user.
        /// </summary>
        /// <param name="user">The user.</param>
        /// <returns></returns>
        /// 创建人:李允智
        /// 创建时间:2016/1/28
        /// 描述:登录
        public string Login(Users user)
        {
            if (usersCore.Login(user) != null)
            {
                FormsAuthentication.SetAuthCookie(user.account, false);
                comm.success = true;
                return JsonHelper.SerializeObject(comm);
            }
            else
            {
                comm.success = false;
                comm.message = "登录失败,请检查账号密码";
                return JsonHelper.SerializeObject(comm);
            }
        }
 public Users Login(Users user)
 {
     return MongodbHelper.GetOne<Users>("Users", Query.And(Query.EQ("account", user.account),Query.EQ("password",user.password)));
 }