Пример #1
0
        public JsonResult SetProfile(uint id, int level, int slowms)
        {
            var mongo = new MongoProfileContext(id);

            mongo.SetProfile(level, slowms);
            return(Json(new { Success = true, Message = "Profile设置成功" }));
        }
Пример #2
0
        public JsonResult GetProfileData(uint id, int limit)
        {
            var mongo = new MongoProfileContext(id);
            var list  = mongo.GetProfileData(limit);

            return(Json(new { Success = true, Message = string.Empty, Result = list }));
        }
Пример #3
0
        public ActionResult ShowProfile(uint id)
        {
            var mongo = new MongoProfileContext(id);
            var model = new ShowProfileModel
            {
                ID     = id,
                Title  = mongo.Database.FullInfo,
                Status = mongo.GetProfileStatus()
            };

            return(View(model));
        }