コード例 #1
0
        public JsonResult getCountryGuiHua(int page, int rows)
        {
            var list   = new JiaJiBLL.stubll().showcounguihua();
            var result = new { total = list.Count, rows = list.OrderBy(e => e.TypeID).Skip((page - 1) * rows).Take(rows) };

            return(Json(result));
        }
コード例 #2
0
        /// <summary>
        /// 删除留学规划
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        public int deleteCountryGuiHua(string ids)
        {
            bool isOK = new JiaJiBLL.stubll().Delcounguihua(ids);

            if (isOK)
            {
                return(0);
            }
            else
            {
                return(1);
            }
        }
コード例 #3
0
 public ActionResult addCountryGuiHua(JiaJiModels.studentprogramtype model)
 {
     try
     {
         var i = new JiaJiBLL.stubll().addcounguihua(model);
         if (i > 0)
         {
             return(Json(new { Success = true, Message = "添加成功" }));
         }
         else
         {
             return(Json(new { Success = false, Message = "添加失败" }));
         }
     }
     catch
     {
         return(Json(new { Success = false, Message = "添加失败" }));
     }
 }
コード例 #4
0
        public JsonResult editCountryGuiHua(JiaJiModels.studentprogramtype model)
        {
            try
            {
                int id = model.TypeID;

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