熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> .NET編程 >> 正文

ASP.NET 登陸代碼注釋

2022-06-13   來源: .NET編程 

  /// <summary>

  /// 判斷用戶是否存在

  /// </summary>

  /// <param name=P_Str_Name>會員登錄名</param>

  /// <param name=P_Str_Password>會員登錄密碼</param>

  /// <returns></returns>

  public int UserExists(string P_Str_Name string P_Str_Password) {

  SqlConnection myConn = dbObjGetConnection()

  SqlCommand myCmd = new SqlCommand(Pr_UserExists myConn)

  myCmdCommandType = CommandTypeStoredProcedure;

  //添加參數

  SqlParameter Name = new SqlParameter(@Name SqlDbTypeVarChar

  NameValue = P_Str_Name;

  myCmdParametersAdd(Name)

  SqlParameter Password = new SqlParameter(@Password SqlDbTypeVarChar

  PasswordValue = P_Str_Password;

  myCmdParametersAdd(Password)

  SqlParameter returnValue = myCmdParametersAdd(returnValue

  SqlDbTypeInt

  returnValueDirection = ParameterDirectionReturnValue;

  //執行過程

  myConnOpen()

  try {

  myCmdExecuteNonQuery()

  }

  catch (Exception ex) {

  throw (ex)

  }

  finally {

  myCmdDispose()

  myConnClose()

  }

  int P_Int_returnValue = ConvertToInt(returnValueValueToString())

  return P_Int_returnValue;

  }


From:http://tw.wingwit.com/Article/program/net/201311/13851.html
    推薦文章
    Copyright © 2005-2022 電腦知識網 Computer Knowledge   All rights reserved.