title: Show data in GridView based on procedure by passing more the one parameter
body: <p>I have a stored procedure and I want to get the result in a <code>DataGridView</code>.</p>
  
  <p>As shown below I have 5 parameters, and I want to use only one of them each time.  The rest can be null values. </p>
  
  <p>For example:  "I want to filter by 5 different ways but, each time I will use one parameter only like ID, for second case I will filter by Date etc...." </p>
  
  <p>I will pass the data from textboxes in the form.</p>
  
  <p>I want the C# code or the way to do it directly from <code>GridView</code> through <code>SqlDataSource</code> :</p>
  
  <pre><code>ALTER Procedure [dbo].[ValidatiorSelection]
  (
          @ID int
          ,@Cisco int
          ,@Date date
          ,@Resoution varchar(60)
          ,@Type varchar(30) 
  )
  AS
  BEGIN
      SET NOCOUNT ON;
  
      SELECT 
             [Justification_ID]
            ,[Justification_Cisco]
            ,[HC_AgentName]
            ,[HC_Q]
            ,[HC_Cisco]
            ,[HC_Site]
            ,[HC_SPV]
            ,[HC_TeamLeader]
            ,[Justification_Date_Of_Case]
            ,[Justification_AgentShift]
            ,[Justification_From]
            ,[Justification_To]
            ,[Justification_OT_Duration]
            ,[Justification_Justification]
            ,[Justification_Description]
            ,[Justification_Creator]
            ,[Justification_Approved_By]
            ,[Justification_Type]
            ,[Justification_Group_ID]
            ,[WFM_Specialeist]
            ,[WFM_Resolution]
            ,[WFM_Status]
            ,[WFM_Comment]
            ,CASE WHEN DateDiff("d",[Justification_Date_Of_Case],[Justification_DT])&gt;2 then 'Exceeded 48 Hours' 
             else 'During 48 Hours'
             end as 'Time Status'
            ,[Justification_DT] as 'Open Time'
            ,[WFM_DT] as 'Close Time'
      FROM 
          [ZainJTA].[dbo].[TBL_WFM] 
      RIGHT JOIN 
          ([ZainJTA].[dbo].[TBL_Justification] 
      LEFT JOIN 
          [ZainJTA].[dbo].[TBL_HC] ON [TBL_Justification].[Justification_Cisco] = [TBL_HC].[HC_Cisco]) ON [TBL_WFM].[WFM_JustificationID] = [TBL_Justification].[Justification_ID]
      WHERE
          [TBL_Justification].Justification_ID = @ID  
          OR [TBL_Justification].Justification_Cisco = @Cisco 
          OR [TBL_Justification].Justification_Date_Of_Case = @Date
          OR [TBL_Justification].Justification_Type = @Type
          OR [TBL_WFM].[WFM_Resolution] = @Resoution     
      ORDER BY 
          [Justification_ID] DESC
  END
  </code></pre>