tijian_tieying/web/dccdc.DAL/G_identityDal.cs
2025-02-20 12:14:39 +08:00

28 lines
695 B
C#

using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using dccdc.Models;
using Dapper;
namespace dccdc.DAL
{
public class G_identityDal
{
public string GetMaxId(string tableName,int needcount)
{
string res;
using (IDbConnection conn = CommHelper.GetSqlConnection())
{
int res1 = conn.Query<int>("GetIdentity", new{ @tablename = tableName, @needcount = needcount },null,true,null,CommandType.StoredProcedure).FirstOrDefault();
return res1.ToString();
}
//return "1";
}
}
}