public int CheckUser(string UserName, string UserPassword, string CurrentIp, out DataTable dtUser) { UserName = CFun.VerifySQL(UserName); int loginRate = 0; int loginState = 0; string SqlStr = ""; SqlParameter[] pam = new SqlParameter[3]; pam[0] = new SqlParameter("@userName", UserName); pam[1] = new SqlParameter("@userPassword", UserPassword); pam[2] = new SqlParameter("@logninIP", CurrentIp); DataSet dst = ExecSql.GetDataSetByStoredProcedure("[AdmUserLogin]", pam); loginRate = Convert.ToInt32(dst.Tables[0].Rows[0][0].ToString()); loginState = Convert.ToInt32(dst.Tables[1].Rows[0][0].ToString()); dtUser = dst.Tables[2]; if (loginRate <= 0) { loginState = -4; } return(loginState); }