Advertisement
Guest User

Untitled

a guest
Sep 21st, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.18 KB | None | 0 0
  1. _cmdGetCustomerControlIds = CreateEmptyTextCommand();
  2.  
  3.                 var commandText = new StringBuilder();
  4.                 commandText.Append(@"SELECT CONTROLID, CONTROLDATA FROM TBCONTROL WHERE COMPANYID = :P_COMPANYID AND STORELOCID = :P_STORELOCID
  5.                                                              AND CONTROLID IN (");
  6.                 for (int i = 0; i < controlIdsToBeLoaded.Count; i++)
  7.                 {
  8.                     commandText.Append(":P_CONTROLID");
  9.                     commandText.Append(i);
  10.                     if (i < controlIdsToBeLoaded.Count - 1)
  11.                         commandText.Append(", ");
  12.  
  13.                     if (i == controlIdsToBeLoaded.Count - 1)
  14.                         commandText.Append(")");
  15.  
  16.                     _cmdGetCustomerControlIds.Parameters.Add("P_CONTROLID" + i, OracleDbType.Varchar2);
  17.                 }
  18.  
  19.                 _cmdGetCustomerControlIds.CommandText = commandText.ToString();
  20.                 _cmdGetCustomerControlIds.Parameters.Add("P_COMPANYID", OracleDbType.Int32);
  21.                 _cmdGetCustomerControlIds.Parameters.Add("P_STORELOCID", OracleDbType.Int32);
  22.                 _cmdGetCustomerControlIds.Prepare();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement