Skip to main content

i need help :'(

3 replies [Last post]
rama_lol0
Offline
Joined: 2011-11-16
Points: 0

yellow guys

ive been working on registration project ,, i did everything i could and its work but unfortunately the ID part of the project cant increment every time i registrate, dont knw whats wrong

hope you can help me guys

thx anyways XD

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
anudeep_gade
Offline
Joined: 2010-09-14
Points: 0

Hi, as far as i understand are you trying to generate Id for a project ? If so, then its better to handle this by backend database SQL sequence.

rama_lol0
Offline
Joined: 2011-11-16
Points: 0

mmm, im trying to generate an id for evry student that click in the submit button ok

like this =========>

w is the major id ok , date of submission should be the added at first like 2009-176-000

now my arraay dosnt seem to work ,,dunno why :(

the 2dimensional array is wrong i guess,, the first one is for the major and the second one is for the year of submission

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {

if (jRadioButton4.isSelected()){
w = "176";
y=0;

}
else if ( jRadioButton3.isSelected()){
w = "173";
y=1;

}

else if ( jRadioButton5.isSelected()) {
w = "171";
y =2;

}

else if ( jRadioButton6.isSelected()){
w = "175";
y = 3;

} else if ( jRadioButton7.isSelected()){
w = "147";
y=4;

}

a = jComboBox1.getSelectedItem();
if (jComboBox1.getSelectedItem()== "2000"){
switch(y)
{case 0:
jTextField5.setText(a + "-" + w + "-00" + lol[0][0]++ );
break;

case 1:
jTextField5.setText(a + "-" + w + "-00" + lol[1][0]++ );
break;
case 2:

jTextField5.setText(a + "-" + w + "-00" + lol[2][0]++ );
break;
case 3:

jTextField5.setText(a + "-" + w + "-00" + lol[3][0]++ );
break;
case 4:

jTextField5.setText(a + "-" + w + "-00" + lol[4][0]++ );
break;

}} etc............

thobarth
Offline
Joined: 2011-11-16
Points: 0

I think if you´d provide really much information, technology, sourcecode snippets etc, someone would be able to help... Your issue is not really interesting, so it´s up to you to make it easy for us to help you.