public string Search(string sRequest) { Response resp = null; Request request = (Request)MySerializer.FromXml(sRequest, typeof(Request)); if (request != null) { string requestUserName = request.UserName; string firstName = string.Empty; string lastName = string.Empty; string sSN = string.Empty; DateTime?birthDate = null; string sISNumber = string.Empty; string stateIssuedNumber = string.Empty; string nineChar = string.Empty; string twentyChar = string.Empty; foreach (Keyword kw in request.Keywords) { if (kw.Name.Equals(Constants.FIRSTNAME, StringComparison.CurrentCultureIgnoreCase)) { firstName = kw.Value; } else if (kw.Name.Equals(Constants.LASTNAME, StringComparison.CurrentCultureIgnoreCase)) { lastName = kw.Value; } else if (kw.Name.Equals(Constants.SSN, StringComparison.CurrentCultureIgnoreCase)) { sSN = kw.Value.Replace("-", string.Empty); } else if (kw.Name.Equals(Constants.BIRTHDATE, StringComparison.CurrentCultureIgnoreCase)) { birthDate = DateTime.Parse(kw.Value, CultureInfo.InvariantCulture); } else if (kw.Name.Equals(Constants.SISNUMBER, StringComparison.CurrentCultureIgnoreCase)) { sISNumber = kw.Value; } else if (kw.Name.Equals(Constants.STATEISSUEDNUMBER, StringComparison.CurrentCultureIgnoreCase)) { stateIssuedNumber = kw.Value; } else if (kw.Name.Equals(Constants.NINECHAR, StringComparison.CurrentCultureIgnoreCase)) { nineChar = kw.Value; } else if (kw.Name.Equals(Constants.TWENTYCHAR, StringComparison.CurrentCultureIgnoreCase)) { twentyChar = kw.Value; } } DataSet dsResult = MakeSQLCall(firstName, lastName, sSN, birthDate, sISNumber, stateIssuedNumber, requestUserName, nineChar, twentyChar); resp = new Response(); int rowCount = 0; if (dsResult != null && dsResult.Tables.Count > 0) { rowCount = dsResult.Tables[0].Rows.Count; foreach (DataRow dr in dsResult.Tables[0].Rows) { resp.Members.Add(GetMemberFromDataRow(dr)); } } resp.Header = new ResponseHeader(rowCount.ToString(CultureInfo.InvariantCulture), "Records Return Successfully"); } return(MySerializer.ToXml(resp)); }