query = "Select Distinct TransmittleNo as TransNo from Temp_Doc Order By TransmittleNo"; ds = null; ds = con.get_records(query); if (ds.Tables[0].Rows.Count > 0) { for (int inti = 0; inti < ds.Tables[0].Rows.Count; inti++) { strTransmittleNo = ds.Tables[0].Rows[0]["TransNo"].ToString(); //strTransmittleSeq = "0"; strPentaTransmittleNo = ""; query = "Select decode(max(TransmittleSeq)+1,null,1,max(TransmittleSeq)+1) as TransSeqNo from T_Doc_Control Where TransmittleNo = '" + strTransmittleNo + "' And TransmittleDate = '" + strIssueDate.Trim() + "' And TransmittleSeq is not null"; // +strTransmittleNo + "'"; dsGrid = null; dsGrid = con.get_records(query); if (dsGrid.Tables[0].Rows.Count > 0) { strPentaTransmittleNo = "PGM-TransmittleNo-" + dsGrid.Tables[0].Rows[0]["TransSeqNo"].ToString(); strTransmittleSeq = dsGrid.Tables[0].Rows[0]["TransSeqNo"].ToString(); } query = "Update T_DOC_Control set PentaTransmittleNo = '" + strPentaTransmittleNo + "',"; query = query + "TransmittleSeq = " + strTransmittleSeq + " "; query = query + "Where TransmittleNo = '" + strTransmittleNo + "' And PentaTransmittleNo IS NULL"; intResult = con.insert_records(query); } }
SELECT TOP 1 ChargebyMonth FROM tblsociety ORDER BY NEWID()
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)