예제 #1
0
 public JObject PageLoad(long start, long limit, string field, string direction, string searchInfo, string logincode)
 {
     try
     {
         DBSortPage   dbsort   = new DBSortPage(start, limit, field, direction);
         DBServer     dbserver = new SqlServer();
         Detail       mybase   = new Detail(dbserver);
         DBSearchInfo sinfo    = new DBSearchInfo(searchInfo);
         string       term     = getTerm();
         if (sinfo.Count <= 0)
         {
             string filterf = string.Format("nvcStuNo='{0}' and nvcElectiveNum like '%{1}%'", logincode, term);
             return(mybase.Load(dbsort, filterf));
         }
         else
         {
             string filterf = sinfo.GetSiftQueryString();
             return(mybase.Load(dbsort, filterf));
         }
     }
     catch (Exception ex)
     {
         return(ShowDataLoadError(ex.Message));
     }
 }
예제 #2
0
 public JObject PageLoad(long start, long limit, string field, string direction, string searchInfo)
 {
     try
     {
         DBSortPage   dbsort   = new DBSortPage(start, limit, field, direction);
         DBServer     dbserver = new SqlServer();
         Class        mybase   = new Class(dbserver);
         DBSearchInfo sinfo    = new DBSearchInfo(searchInfo);
         if (sinfo.Count <= 0)
         {
             return(mybase.Load(dbsort));
         }
         else
         {
             string filterf = sinfo.GetSiftQueryString();
             return(mybase.Load(dbsort, filterf));
         }
     }
     catch (Exception ex)
     {
         return(ShowDataLoadError(ex.Message));
     }
 }