You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
DS7/HomeService/DBHelper/TestUserInfo.cs

31 lines
1.1 KiB
C#

2 years ago
using System;
using System.Collections.Generic;
//using System.Linq;
using System.Text;
using System.Data.SqlClient;
namespace Data.DBHelper
{
public class TestUserInfo
{
public int SaveUserInfo(string loginname, string password)
{
//StringBuilder searchSql = new StringBuilder();
////searchSql.Append("select * from [pub].[US_Login] where userID='"+userID+"' and password='"+passwordInput+"'");
//searchSql.Append("select * from [pub].[temp]");
string sql = " insert into US_Login (loginName,[password]) values (@loginname, @password)";
SqlCommand cmd = new SqlCommand();
cmd.CommandText = sql.ToString();
SqlParameter[] parameter = new SqlParameter[2];
parameter[0] = SqlHelper.GetParameter("@loginname", loginname);
parameter[1] = SqlHelper.GetParameter("@password", password);
//p[0] = SqlHelper.GetParameter("@loginName", loginName);
//p[1] = SqlHelper.GetParameter("@passwordInput", passwordInput);
return SqlHelper.ExecuteTransSql(sql, parameter);
}
}
}