济沧海公告

master
wanghaomei 2 years ago
parent f5d8c1e95b
commit e3f620d23b

@ -13,7 +13,7 @@ namespace DSWeb.SoftMng.DAL
public bool Exists(string GID) public bool Exists(string GID)
{ {
StringBuilder strSql=new StringBuilder(); StringBuilder strSql=new StringBuilder();
strSql.Append("select count(1) from op_Notice"); strSql.Append("select count(1) from op_Notice_JCH");
strSql.Append(" where "); strSql.Append(" where ");
strSql.Append(" GID = @GID "); strSql.Append(" GID = @GID ");
@ -29,7 +29,7 @@ namespace DSWeb.SoftMng.DAL
public int Add(DSWeb.SoftMng.Model.op_Notice model) public int Add(DSWeb.SoftMng.Model.op_Notice model)
{ {
StringBuilder strSql=new StringBuilder(); StringBuilder strSql=new StringBuilder();
strSql.Append("insert into op_Notice("); strSql.Append("insert into op_Notice_JCH(");
strSql.Append("GID,Title,Content,CreateUser,CreateTime"); strSql.Append("GID,Title,Content,CreateUser,CreateTime");
strSql.Append(") values ("); strSql.Append(") values (");
strSql.Append("@GID,@Title,@Content,@CreateUser,@CreateTime"); strSql.Append("@GID,@Title,@Content,@CreateUser,@CreateTime");
@ -57,7 +57,7 @@ namespace DSWeb.SoftMng.DAL
public int Update(DSWeb.SoftMng.Model.op_Notice model) public int Update(DSWeb.SoftMng.Model.op_Notice model)
{ {
StringBuilder strSql=new StringBuilder(); StringBuilder strSql=new StringBuilder();
strSql.Append("update op_Notice set "); strSql.Append("update op_Notice_JCH set ");
strSql.Append(" GID = @GID,"); strSql.Append(" GID = @GID,");
strSql.Append(" Title = @Title,"); strSql.Append(" Title = @Title,");
@ -86,7 +86,7 @@ namespace DSWeb.SoftMng.DAL
public int Delete(string GID) public int Delete(string GID)
{ {
StringBuilder strSql=new StringBuilder(); StringBuilder strSql=new StringBuilder();
strSql.Append("delete from op_Notice "); strSql.Append("delete from op_Notice_JCH ");
strSql.Append(" where GID=@GID "); strSql.Append(" where GID=@GID ");
SqlParameter[] parameters = { SqlParameter[] parameters = {
new SqlParameter("@GID", SqlDbType.NVarChar,50) }; new SqlParameter("@GID", SqlDbType.NVarChar,50) };
@ -100,7 +100,7 @@ namespace DSWeb.SoftMng.DAL
public int DeleteListWhere(string strWhere) public int DeleteListWhere(string strWhere)
{ {
StringBuilder strSql=new StringBuilder(); StringBuilder strSql=new StringBuilder();
strSql.Append("delete from op_Notice "); strSql.Append("delete from op_Notice_JCH ");
if(strWhere.Trim()!="") if(strWhere.Trim()!="")
{ {
strSql.Append(" where "+strWhere); strSql.Append(" where "+strWhere);
@ -114,7 +114,7 @@ namespace DSWeb.SoftMng.DAL
{ {
StringBuilder strSql=new StringBuilder(); StringBuilder strSql=new StringBuilder();
strSql.Append("select GID, Title, Content, CreateUser, CreateTime "); strSql.Append("select GID, Title, Content, CreateUser, CreateTime ");
strSql.Append(" from op_Notice "); strSql.Append(" from op_Notice_JCH ");
strSql.Append(" where GID=@GID "); strSql.Append(" where GID=@GID ");
SqlParameter[] parameters = { SqlParameter[] parameters = {
new SqlParameter("@GID", SqlDbType.NVarChar,50) }; new SqlParameter("@GID", SqlDbType.NVarChar,50) };
@ -130,7 +130,7 @@ namespace DSWeb.SoftMng.DAL
{ {
StringBuilder strSql=new StringBuilder(); StringBuilder strSql=new StringBuilder();
strSql.Append("select * "); strSql.Append("select * ");
strSql.Append(" FROM op_Notice "); strSql.Append(" FROM op_Notice_JCH ");
if(strWhere.Trim()!="") if(strWhere.Trim()!="")
{ {
strSql.Append(" where "+strWhere); strSql.Append(" where "+strWhere);
@ -149,7 +149,7 @@ namespace DSWeb.SoftMng.DAL
strSql.Append(" top "+Top.ToString()); strSql.Append(" top "+Top.ToString());
} }
strSql.Append(" * "); strSql.Append(" * ");
strSql.Append(" FROM op_Notice "); strSql.Append(" FROM op_Notice_JCH ");
if(strWhere.Trim()!="") if(strWhere.Trim()!="")
{ {
strSql.Append(" where "+strWhere); strSql.Append(" where "+strWhere);
@ -168,7 +168,7 @@ namespace DSWeb.SoftMng.DAL
strSql.Append(" SELECT ROW_NUMBER() OVER ("); strSql.Append(" SELECT ROW_NUMBER() OVER (");
if (!string.IsNullOrEmpty(orderby.Trim())) if (!string.IsNullOrEmpty(orderby.Trim()))
strSql.Append("order by T." + orderby); strSql.Append("order by T." + orderby);
strSql.Append(")AS Row, T.* from op_Notice T "); strSql.Append(")AS Row, T.* from op_Notice_JCH T ");
if (!string.IsNullOrEmpty(strWhere.Trim())) if (!string.IsNullOrEmpty(strWhere.Trim()))
{ {
strSql.Append(" WHERE " + strWhere); strSql.Append(" WHERE " + strWhere);
@ -184,7 +184,7 @@ namespace DSWeb.SoftMng.DAL
public int GetRecordCount(string strWhere) public int GetRecordCount(string strWhere)
{ {
StringBuilder strSql=new StringBuilder(); StringBuilder strSql=new StringBuilder();
strSql.Append("select count(1) FROM op_Notice "); strSql.Append("select count(1) FROM op_Notice_JCH ");
if(strWhere.Trim()!="") if(strWhere.Trim()!="")
{ {
strSql.Append(" where "+strWhere); strSql.Append(" where "+strWhere);

Loading…
Cancel
Save