예제 #1
0
 public Views.courseMsg courseMsg(string id)
 {
     try {
         string token = "";
         try
         {
             token = HttpContext.Current.Request.Headers["Authorization"].ToString();
         }
         catch (Exception) {
             token = "";
         }
         Cook.BLL.course course = new Cook.BLL.course();
         return(course.DataRowToSelectMsg(id, token));
     }
     catch (Exception) {
         return(null);
     }
 }
예제 #2
0
 public Views.select select([FromBody] JObject json)
 {
     try {
         //请求哪一页
         int pageIndex;
         Int32.TryParse(json["pageIndex"].ToString(), out pageIndex);
         //搜索关键字
         string key = json["key"].ToString();
         //教程类型
         string          type = json["type"].ToString();
         Views.select    s    = new Views.select();
         Cook.BLL.course c    = new Cook.BLL.course();
         s.hasMovie = c.hasMovie(key);
         s.newPage  = pageIndex.ToString();
         s.allCount = c.GetCount(key, type);
         s.content  = c.GetListToSelect(pageIndex, key, type);
         return(s);
     }
     catch (Exception)
     {
         return(null);
     }
 }