commonsqlexecute.cs
来自「HR系统,人事,能力素质,考勤,薪资等,AJAX,ASP.NET」· CS 代码 · 共 38 行
CS
38 行
using System;
using iSun.DbDAL;
namespace iSun.SPL.ORM
{
/// <summary>
/// CommonSqlExecute 的摘要说明。
/// </summary>
public class CommonSqlExecute
{
/// <summary>
/// 获取符合条件的记录数。
/// </summary>
/// <param name="Tablename"></param>
/// <param name="where"></param>
/// <returns></returns>
public static int GetResultNum(string TableName,string where)
{
string m_Sql = string.Empty; //new iSunXoft.Common.Getsql().GetSql("GetResultNum");
m_Sql = string.Format(m_Sql,TableName);
if (where!="")
{
m_Sql += "where " + where;
}
try
{
int m_ResultNum = (int)(new DbDAL.DbSql()).GetSingle(m_Sql);
return m_ResultNum;
}
catch(System.Exception e)
{
throw e;
}
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?