I want to write that two strbldrSQL.Append
in single strbldrSQL
.
Because Im inserting records in 2 DataSets
dsorderHeader
and dsorderDetail
respectively.
if (strbldrSQL != null) strbldrSQL.Clear();
else strbldrSQL = new StringBuilder();
strbldrSQL.Append(@" SELECT ORDHEDR01.* FROM ORDHEDR01 "
+ " WHERE ORDHEDR01.COMPANY = " + argintCompany + " "
+ " AND ORDHEDR01.WHSE = " + argintWarehouse + " "
+ " AND ORDHEDR01.ORDNUM = " + arglngOrderNumber + " "
);
dsOrderHeader = DAL.pfGetDataSet(ref argobjMnCnnCls, strbldrSQL.ToString(), true);
if (dsOrderHeader == null) return CNS.gcUpdateFailed + ";" + "Unable to get data";
strbldrSQL.Clear();
strbldrSQL.Append(@" SELECT ORDDETL02.* FROM ORDDETL02 "
+ " WHERE ORDDETL02.COMPANY = " + argintCompany + " "
+ " AND ORDDETL02.WHSE = " + argintWarehouse + " "
+ " AND ORDDETL02.ORDNUM = " + lngOrderNumber + " "
);
dsOrderDetail = DAL.pfGetDataSet(ref argobjMnCnnCls, strbldrSQL.ToString(), true);
if (dsOrderDetail == null) return CNS.gcUpdateFailed + ";" + "Unable to get data";