Commit f89d4a3a authored by vkadam's avatar vkadam

Remove if/else condition from result set next.


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@98600 ce508802-f39f-4f6c-b175-0d175dae99d5
parent fa442ca7
...@@ -182,8 +182,6 @@ public class ConfVouchChPartnerSch implements Schedule ...@@ -182,8 +182,6 @@ public class ConfVouchChPartnerSch implements Schedule
Timestamp vDt=null; Timestamp vDt=null;
String tranDate="01/04/15";
try try
{ {
vDt = Timestamp.valueOf(genericUtility.getValidDateString(voucher_date.trim(),genericUtility.getApplDateFormat(), vDt = Timestamp.valueOf(genericUtility.getValidDateString(voucher_date.trim(),genericUtility.getApplDateFormat(),
...@@ -218,14 +216,7 @@ public class ConfVouchChPartnerSch implements Schedule ...@@ -218,14 +216,7 @@ public class ConfVouchChPartnerSch implements Schedule
pstmt=conn.prepareStatement(sql); pstmt=conn.prepareStatement(sql);
pstmt.setTimestamp(1, vDt); pstmt.setTimestamp(1, vDt);
rs=pstmt.executeQuery(); rs=pstmt.executeQuery();
if(!rs.next())
{
System.out.println("@V@ No record found");
fos1.write(("No records found ").getBytes());
}
else
{
System.out.println("@V@ Record found");
while(rs.next()) while(rs.next())
{ {
cnt++; cnt++;
...@@ -237,13 +228,18 @@ public class ConfVouchChPartnerSch implements Schedule ...@@ -237,13 +228,18 @@ public class ConfVouchChPartnerSch implements Schedule
System.out.println("@V@ Voucher TranId :-["+tranId+" confirm return string :- ["+retString+"]"); System.out.println("@V@ Voucher TranId :-["+tranId+" confirm return string :- ["+retString+"]");
fos1.write(("Status is:: [" + retString +"]\r\n").getBytes()); fos1.write(("Status is:: [" + retString +"]\r\n").getBytes());
} }
}
rs.close(); rs.close();
rs=null; rs=null;
pstmt.close(); pstmt.close();
pstmt=null; pstmt=null;
System.out.println("@V@ Iteration count :-["+cnt+"]"); System.out.println("@V@ Iteration count :-["+cnt+"]");
if(cnt==0)
{
System.out.println("@V@ No record found");
fos1.write(("No records found \r\n").getBytes());
}
}catch(Exception e) }catch(Exception e)
{ {
e.printStackTrace(); e.printStackTrace();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment