Example #1
0
File: SQL.cs Project: Zilioli/WMS
 public void AddParameter(string pName, WMSDBTypes.WMSDBType pDbType, int pSize, object pVal, ParameterDirection pDirection)
 {
     try
     {
         if (objCommand != null)
         {
             if (pDirection == ParameterDirection.Input)
                 objCommand.Parameters.Add(pName, WMSDBTypes.SQL(pDbType), pSize).Value = (pVal == null) ? DBNull.Value : pVal;
             else
                 objCommand.Parameters.Add(pName,  WMSDBTypes.SQL(pDbType)).Direction = ParameterDirection.Output;
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Example #2
0
File: SQL.cs Project: Zilioli/WMS
 public void AddParameter(string pName, WMSDBTypes.WMSDBType pDbType, int pSize, object pVal, ParameterDirection pDirection)
 {
     try
     {
         if (objCommand != null)
         {
             if (pDirection == ParameterDirection.Input)
             {
                 objCommand.Parameters.Add(pName, WMSDBTypes.SQL(pDbType), pSize).Value = (pVal == null) ? DBNull.Value : pVal;
             }
             else
             {
                 objCommand.Parameters.Add(pName, WMSDBTypes.SQL(pDbType)).Direction = ParameterDirection.Output;
             }
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }