2
Reply

How can i filter the response so it only returns one value

Cassie Mod

Cassie Mod

Jan 11 2017 11:01 AM
240
HI,
 
Ive got the following response and request 
  1. // Gets active shared call apearances  
  2.                        var service = new TechnicServiceClient();  
  3.                        var sessionId = Guid.Parse(HttpContext.Current.Session["BWSESSION"].ToString());  
  4.                        var jsessionId = App.User.jSessionId;  
  5.                        var request = new GetScaEndpointsRequest  
  6.                        {  
  7.                            UserId = Request.QueryString["userId"],  
  8.                            sessionId = sessionId,  
  9.                            requestId = _requestId,  
  10.                            requestUsername = null,  
  11.                            jSessionId = jsessionId  
  12.                        };  
  13.   
  14.                        var response = service.GetScaEndpoints(request);  
  15.   
  16.                        // set the selected item to the user  
  17.                        var LinePort = (Label)e.Item.FindControl("LinePortLabel");  
  18.                        var selectedDeviceToDelete = response.LinePort // how do i get the response of only the selected value ??  
The response contains in this case two devices wich have several attributes like LinePort.
My question is, How can i get only the selectedDevice ( to Delete) ??
LinePort.Text contains the value of the selected Item.
however then i try
 
var selectedDeviceToDelete = response.LinePort.Select(LinePort.Text); but that doesn;t work.  so based on the entire response i need to get the selectedResonse.LinePort, but how ?????
 
thnx  
 
 

Answers (2)