12
13693261870
2024-05-14 6c882b9487a8f0c1b55d768c0e58f3ba87b21bf4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
using System;
using System.Collections.Generic;
using System.Data;
using System.Text;
using Terra.YaoGan.Common;
 
namespace Terra.YaoGan.Service
{
   public class RootCatlogService
    {
        private sqlserverDBhelper db = new sqlserverDBhelper();
        
 
        //查询数量  
        public int GetRowCount(string  sql)
        {
           DataTable   dt=db.QueryTable(sql);
            if (dt == null)
            {
                return 0;
            }else
            {
                return dt.Rows.Count;
            }
        }
 
 
 
        //增加  修改 删除
        public  int Add()
        {
            return -1;
        }
 
        public DataTable GetTable()
        {
            string sql = "select  *  from  RootCatlog ORDER BY  id DESC ;";
            DataTable dt = db.QueryTable(sql);
            //DataTableToJson.DtToJson(dt);
            return dt;
        }
 
        //查询数据
        public  DataTable GetTable(string where)
        {
          //string sql = "select  *  from  RootCatlog ORDER BY  name ;";
          //DataTable  dt=db.QueryTable(sql);
          return null;
        }
 
 
 
    }
}