package swing;
import com.bwm.string.Str;
public class Rsserach{
private String user1;
private String user2;
private String user3;
private String user4;
public String toSQL(String user1,String user2,String user3,String user4){
Str str=new Str();
this.user1=user1;
this.user2=user2;
this.user3=str.toChinese(user3);
this.user4=str.toChinese(user4);
if(user3.equals("")&&user4.equals("")){
return new String("select * from jobwork where Name='"+user1+"' and Sign='"+user2+"'");
}
else if((!user3.equals("")&&user4.equals(""))){
return new String("select * from jobwork where Name='"+user1+"'and Sign='"+user2+"' and DateTime='"+user3+"'");
}
else if((user3.equals("")&&!user4.equals(""))){
return new String("select * from jobwork where Name='"+user1+"'and Sign='"+user2+"' and Plcontent='"+user4+"'");
}
else if((!user3.equals("")&&!user4.equals(""))){
return new String("select * from jobwork where Name='"+user1+"'and Sign='"+user2+"' and DateTime='"+user3+"' and Plcontent='"+user4+"'");
}
return new String("select * from jobwork where Name='administrator'");
}
}