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
Gaurav TomarPosted May 27, 2008, 4:31 AM
Try this:
if
(rs_CustCODE.RecordCount = 1){
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";
}