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;
|
}
|
|
|
|
}
|
}
|