Auto Generate Number

May 26 2008 3:51 AM

Dear Friends,

I need a great help from you, that is here in the given below coding(VB 6.0) need to be converted into C# language.

 If rs_CUSTCODE.RecordCount = 1 Then
    GenerateCode = Mid(Trim(txtCusCode.Text), 1, 3) & Format(Val(Mid(Trim(rs_CUSTCODE!Cust_code), 4, 5)) + 1, "00000")
  Else
    GenerateCode = Mid(Trim(txtCusCode.Text), 1, 3) & "00001"
  End If


Answers (1)