我的第一个程序

    技术2022-05-11  63

    package com.ahead; import java.sql.*; import com.ahead.scitech.*; public class Right {     public String value = "";     public String qxses = "";     public String msg = "N";     public int id = 1319;     public void setValues(String s) {         this.value = s.trim();     }     public void setQxses(String j) {         this.qxses = j.trim();     }     public String Cright(){         //String str = "";         if(value.equals("")){             msg = "N";         }else{         try{         A6_UTIL obj = new A6_UTIL();         ResultSet rs = obj.getRs("select * from tab_jgqx where jgqxmc='"+value+"'");             while(rs.next()){             id = rs.getInt(1);             }             rs.close();         if(qxses.substring(id-1,id).equals("0")){             msg = "Y";         }else{             msg = "N";         }         }catch(Exception e){             System.out.println("This is an error in Right:"+e);             msg = "N";         }         }         return msg;     } }  

    最新回复(0)