问题描述
privatevoidbtnLogin_Click(objectsender,EventArgse){if(txtAdmin.Text.Trim()==""||txtPwd.Text.Trim()==""){MessageBox.Show("用户名和密码不能为空!","出错",MessageBoxButtons.OK,MessageBoxIcon.Exclamation);}else{SysAdminadmin=newSysAdmin();admin.AdminID=txtAdmin.Text;admin.AdminPwd=txtPwd.Text;OracleDataReaderdr=admin.Login(admin);if(dr.Read()){MessageBox.Show("登录成功!");}}}publicOracleDataReaderLogin(SysAdminadmin){OracleDataReaderdr=null;stringstrSql="select*fromtb_userwhereadminID=@adminIDandadminPwd=@adminPwd";try{OracleParameter[]param={newOracleParameter("@adminID",OracleType.NVarChar,20),newOracleParameter("@adminPwd",OracleType.NVarChar,20)};param[0].Value=AdminID;param[1].Value=AdminPwd;dr=OraDB.ExecuteReader(strSql,param);returndr;}catch{throw;}finally{if(dr!=null)dr.Close();}}}publicstaticOracleDataReaderExecuteReader(stringSQLString,paramsOracleParameter[]Parms){OracleConnectionconnection=newOracleConnection(strConn);OracleCommandcmd=newOracleCommand();try{PrepareCommand(cmd,connection,null,SQLString,Parms);OracleDataReadermyReader=cmd.ExecuteReader(CommandBehavior.CloseConnection);cmd.Parameters.Clear();returnmyReader;}catch(System.Data.SqlClient.SqlExceptione){throwe;}}
解决方案
解决方案二:
去医院看病然后在医院说请各位医生帮我看看我有什么病
解决方案三:
解决方案四:
你这样提问本身就是个错误
解决方案五:
引用1楼crystal_lz的回复:
去医院看病然后在医院说请各位医生帮我看看我有什么病
大师说话富含哲理。哈哈哈