📄 activationsp.cs
字号:
using System;
using System.Data;
using System.Data.SqlClient;
using System.Data.SqlTypes;
using Microsoft.SqlServer.Server;
public partial class StoredProcedures
{
[Microsoft.SqlServer.Server.SqlProcedure]
public static void IsActiveInfoCorrect(int pUserID,string pActiveCode)
{
string SQL = @"SELECT [ActivationID]
FROM [Activation]
WHERE [UserID]=@UserID
AND [ActivationCode]=@ActivationCode";
SqlParameter[] parms = new SqlParameter[2];
parms[0] = new SqlParameter("@UserID", SqlDbType.Int);
parms[1] = new SqlParameter("@ActivationCode", SqlDbType.NVarChar, 50);
parms[0].Value = pUserID;
parms[1].Value = pActiveCode;
DBTools.CreateStoredProcedure(SQL, parms);
}
[SqlProcedure]
public static void AddActiveInfo(int pUserID, string pActivationCode)
{
string SQL = @"INSERT INTO [Activation]
([UserID],[ActivationCode])
VALUES
(@UserID,@ActivationCode)";
SqlParameter[] parms = new SqlParameter[2];
parms[0] = new SqlParameter("@UserID", SqlDbType.Int);
parms[1] = new SqlParameter("@ActivationCode", SqlDbType.NVarChar, 50);
parms[0].Value = pUserID;
parms[1].Value = pActivationCode;
DBTools.CreateStoredProcedure(SQL, parms);
}
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -