Ejemplo n.º 1
0
        public JsonResult Deletes(long [] ids)
        {
            var result = new JsonResultModel {
                ResultState = UserScoreLogs.DeleteUserScoreLogs(ids) > 0
            };

            return(Json(result));
        }
Ejemplo n.º 2
0
        public JsonResult Delete(long id)
        {
            var result = new JsonResultModel {
                ResultState = UserScoreLogs.DeleteUserScoreLog(id) > 0
            };

            return(Json(result));
        }
Ejemplo n.º 3
0
        public ActionResult Index(int?page)
        {
            int pageIndex = page.HasValue ? page.Value : 1;
            int pageSize = PageConfig.BackstagePageSize;
            int count, pageCount;
            var result = UserScoreLogs.UserScoreLogInfosToVModels(UserScoreLogs.GetUserScoreLogPageList(pageIndex, pageSize, null, null, out pageCount, out count));
            PagedList <UserScoreLogVModel> pl = result.ToPagedList(pageIndex, pageSize);

            pl.TotalItemCount   = count;
            pl.CurrentPageIndex = pageIndex;
            return(View(pl));
        }
Ejemplo n.º 4
0
        public JsonResult Add(UserScoreLogVModel model)
        {
            var result = new JsonResultModel();

            if (ModelState.IsValid)
            {
                //add
                result.ResultState = UserScoreLogs.AddUserScoreLog(UserScoreLogs.UserScoreLogVModelToInfo(model)) > 0;
            }
            else
            {
                result.ResultState = false;
                result.Message     = ModelStateHelper.GetAllErrorMessage(ModelState);
            }

            return(Json(result));
        }
Ejemplo n.º 5
0
        public ActionResult Edit(int id)
        {
            var model = UserScoreLogs.UserScoreLogInfoToVModel(UserScoreLogs.GetUserScoreLogInfo(id));

            return(View(model));
        }