how to call stored procedure with parameters

May 7 2018 11:17 PM
how to call stored procedure with parameters
  1. public readonly static string FREIGHTHEAD = "SELECT SR.ApprovalNumber ,SR.Remarks SRRemarks," +  
  2. " P.Description PDescription,SP.Description SPDescription,U.FirstName UFirstName, L.Description LDescriptionFrom, " +  
  3. " LO.Description LODescriptionTo,cn.OriginalContainerNumber ContainerNumber FROM SeaFreightApprovalRateDetails SR INNER JOIN SeaFreightApproval S ON " +  
  4. " SR.SeaFreightApprovalId=S.Id LEFT JOIN Party P ON SR.PartyId=P.Id LEFT JOIN Shipments SP ON S.ShipmentId=SP.Id " +  
  5. " LEFT JOIN Users U ON SR.ApprovedById=U.Id LEFT JOIN Locations L ON S.FromLocationId=L.Id LEFT JOIN Locations LO ON" +  
  6. " S.ToLocationId=LO.Id INNER JOIN Containers cn ON S.ContainerId=cn.Id WHERE S.ContainerId=@_ContainerId";  
previously  am using a query like this by passing parameter
 
Now i want to  call stored procedure  how to pass the parameters to that stored procedure
  1. public readonly static string GETINVOICEHEADERREPORT = "EXEC SP_GetInvoiceHeaderReport"

Answers (1)