Exemple #1
0
        /// <summary>
        /// 删除学员列表
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        public int deleteMaxScoStu(string ids)
        {
            bool isOK = new JiaJiBLL.LearnerBll().DelMaxScoStu(ids);

            if (isOK)
            {
                return(0);
            }
            else
            {
                return(1);
            }
        }
Exemple #2
0
        /// <summary>
        /// 删除学员列表
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        public int deleteLearnerList(string ids)
        {
            bool isOK = new JiaJiBLL.LearnerBll().DelLearner(ids);

            if (isOK)
            {
                return(0);
            }
            else
            {
                return(1);
            }
        }
Exemple #3
0
        public JsonResult getMaxScoStu(int page, int rows, int?LearnerID = null, int?LanguageID = null)
        {
            var list   = new JiaJiBLL.LearnerBll().showMaxScoStu();
            var result = new
            {
                total = list.
                        Where(e =>
                              (LearnerID == null ? true : e.LearnerID == LearnerID) &&
                              (LanguageID == null ? true : e.LanguageID == LanguageID)
                              ).Count(),
                rows = list.
                       Where(e =>
                             (LearnerID == null ? true : e.CountryID == LearnerID) &&
                             (LanguageID == null ? true : e.LanguageID == LanguageID)
                             ).Skip((page - 1) * rows).Take(rows)
            };

            return(Json(result));
        }
Exemple #4
0
        public JsonResult getLearnerList(int page, int rows, int?CountryID = null)
        {
            var list   = new JiaJiBLL.LearnerBll().showLearner();
            var result = new
            {
                total = list.
                        Where(e =>
                              (CountryID == null ? true : e.CountryID == CountryID)

                              ).Count(),
                rows = list.
                       Where(e =>
                             (CountryID == null ? true : e.CountryID == CountryID)

                             ).Skip((page - 1) * rows).Take(rows)
            };

            return(Json(result));
        }
Exemple #5
0
 public JsonResult addMaxScoStu(JiaJiModels.LearnerModel infor)
 {
     try
     {
         infor.LearnImage = "/image/" + infor.LearnImage;
         var i = new JiaJiBLL.LearnerBll().addMaxScoStu(infor);
         if (i > 0)
         {
             return(Json(new { Success = true, Message = "添加成功" }));
         }
         else
         {
             return(Json(new { Success = false, Message = "添加失败" }));
         }
     }
     catch
     {
         return(Json(new { Success = false, Message = "添加失败" }));
     }
 }
Exemple #6
0
        public JsonResult editMaxScoStu(JiaJiModels.LearnerModel model)
        {
            try
            {
                int id = model.LearnSorceID;

                var i = new JiaJiBLL.LearnerBll().UpdateMaxScoStu(model);
                if (i > 0)
                {
                    return(Json(new { Success = true, Message = "修改成功" }));
                }
                else
                {
                    return(Json(new { Success = false, Message = "修改失败" }));
                }
            }
            catch
            {
                return(Json(new { Success = false, Message = "修改失败" }));
            }
        }