prabha haran

prabha haran

  • NA
  • 81
  • 32.5k

i have four radio button i have to generate a code based on

Apr 15 2017 3:22 AM
hi
 
i have radio button TP and TR
 
when i select TP my code should be KNC/TP/1 in my text box serially
when i select TR my code should be KNC/TR/1 in my text box and save in database
 
my code is
 
string selectedval = rbl.SelectedValue;
if(selectedval=="TR")
{
txticode.Text = objDataAccess.Autoid("select top 1(InstrumentID) from Tbl_Instrument order by InstrumentID desc", "KNC/TR/");

}
if (selectedval == "TP")
{
txticode.Text = objDataAccess.Autoid("select top 1(InstrumentID) from Tbl_Instrument order by InstrumentID desc", "KNC/TP/");


}
if (selectedval == "SP")
{
txticode.Text = objDataAccess.Autoid("select top 1(InstrumentID) from Tbl_Instrument order by InstrumentID desc", "KNC/SP/");

}
if (selectedval == "IN")
{
txticode.Text = objDataAccess.Autoid("select top 1(InstrumentID) from Tbl_Instrument order by InstrumentID desc", "KNC/IN/");

 
 
 

Answers (1)