Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #region 驗證帳號重複
- public bool CheckAccount(string UserAccount)
- {
- using (SqlConnection con = new SqlConnection(DBConnection.ConnectString))
- {
- SqlCommand cmd = new SqlCommand(SPName.User.CheckAccount_Get, con);
- cmd.CommandType = CommandType.StoredProcedure;
- con.Open();
- cmd.Parameters.AddWithValue("@UserAccount", UserAccount);
- using (SqlDataReader dr = cmd.ExecuteReader())
- {
- while (dr.Read())
- {
- if (dr.HasRows)
- {
- return true;
- }
- }
- return false;
- }
- }
- }
- #endregion
Add Comment
Please, Sign In to add comment