Retrieves employee records that match the query criteria.
Request
Response
XMLOPS
VB.NET
C#
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 | <?xml version="1.0" encoding="utf-8"?> <?qbposxml version="4.0"?> <QBPOSXML> <QBPOSXMLMsgsRq onError="stopOnError"> <EmployeeQueryRq metaData="ENUMTYPE" iterator="ENUMTYPE" iteratorID="UUIDTYPE"> <MaxReturned >INTTYPE</MaxReturned> <!-- optional --> <OwnerID >GUIDTYPE</OwnerID> <!-- optional, may repeat --> <ListID >IDTYPE</ListID> <!-- optional --> <!-- BEGIN OR --> <TimeCreatedFilter> <!-- optional --> <!-- MatchNumericCriterion may have one of the following values: LessThan, LessThanEqual, Equal, GreaterThan, GreaterThanEqual --> <MatchNumericCriterion >ENUMTYPE</MatchNumericCriterion> <!-- required --> <TimeCreated >DATETIMETYPE</TimeCreated> <!-- required --> </TimeCreatedFilter> <!-- OR --> <TimeCreatedRangeFilter> <!-- optional --> <FromTimeCreated >DATETIMETYPE</FromTimeCreated> <!-- required --> <ToTimeCreated >DATETIMETYPE</ToTimeCreated> <!-- required --> </TimeCreatedRangeFilter> <!-- END OR --> <!-- BEGIN OR --> <TimeModifiedFilter> <!-- optional --> <!-- MatchNumericCriterion may have one of the following values: LessThan, LessThanEqual, Equal, GreaterThan, GreaterThanEqual --> <MatchNumericCriterion >ENUMTYPE</MatchNumericCriterion> <!-- required --> <TimeModified >DATETIMETYPE</TimeModified> <!-- required --> </TimeModifiedFilter> <!-- OR --> <TimeModifiedRangeFilter> <!-- optional --> <FromTimeModified >DATETIMETYPE</FromTimeModified> <!-- required --> <ToTimeModified >DATETIMETYPE</ToTimeModified> <!-- required --> </TimeModifiedRangeFilter> <!-- END OR --> <!-- BEGIN OR --> <CityFilter> <!-- optional --> <!-- MatchStringCriterion may have one of the following values: Equal, StartsWith, Contains, EndsWith --> <MatchStringCriterion >ENUMTYPE</MatchStringCriterion> <!-- required --> <City >STRTYPE</City> <!-- required --> </CityFilter> <!-- OR --> <CityRangeFilter> <!-- optional --> <FromCity >STRTYPE</FromCity> <!-- required --> <ToCity >STRTYPE</ToCity> <!-- required --> </CityRangeFilter> <!-- END OR --> <!-- BEGIN OR --> <CommissionPercentFilter> <!-- optional --> <!-- MatchNumericCriterion may have one of the following values: LessThan, LessThanEqual, Equal, GreaterThan, GreaterThanEqual --> <MatchNumericCriterion >ENUMTYPE</MatchNumericCriterion> <!-- required --> <CommissionPercent >FLOATTYPE</CommissionPercent> <!-- required --> </CommissionPercentFilter> <!-- OR --> <CommissionPercentRangeFilter> <!-- optional --> <FromCommissionPercent >FLOATTYPE</FromCommissionPercent> <!-- required --> <ToCommissionPercent >FLOATTYPE</ToCommissionPercent> <!-- required --> </CommissionPercentRangeFilter> <!-- END OR --> <!-- BEGIN OR --> <CountryFilter> <!-- optional --> <!-- MatchStringCriterion may have one of the following values: Equal, StartsWith, Contains, EndsWith --> <MatchStringCriterion >ENUMTYPE</MatchStringCriterion> <!-- required --> <Country >STRTYPE</Country> <!-- required --> </CountryFilter> <!-- OR --> <CountryRangeFilter> <!-- optional --> <FromCountry >STRTYPE</FromCountry> <!-- required --> <ToCountry >STRTYPE</ToCountry> <!-- required --> </CountryRangeFilter> <!-- END OR --> <!-- BEGIN OR --> <EMailFilter> <!-- optional --> <!-- MatchStringCriterion may have one of the following values: Equal, StartsWith, Contains, EndsWith --> <MatchStringCriterion >ENUMTYPE</MatchStringCriterion> <!-- required --> <EMail >STRTYPE</EMail> <!-- required --> </EMailFilter> <!-- OR --> <EMailRangeFilter> <!-- optional --> <FromEMail >STRTYPE</FromEMail> <!-- required --> <ToEMail >STRTYPE</ToEMail> <!-- required --> </EMailRangeFilter> <!-- END OR --> <!-- BEGIN OR --> <FirstNameFilter> <!-- optional --> <!-- MatchStringCriterion may have one of the following values: Equal, StartsWith, Contains, EndsWith --> <MatchStringCriterion >ENUMTYPE</MatchStringCriterion> <!-- required --> <FirstName >STRTYPE</FirstName> <!-- required --> </FirstNameFilter> <!-- OR --> <FirstNameRangeFilter> <!-- optional --> <FromFirstName >STRTYPE</FromFirstName> <!-- required --> <ToFirstName >STRTYPE</ToFirstName> <!-- required --> </FirstNameRangeFilter> <!-- END OR --> <IsTrackingHours >BOOLTYPE</IsTrackingHours> <!-- optional --> <!-- BEGIN OR --> <LastNameFilter> <!-- optional --> <!-- MatchStringCriterion may have one of the following values: Equal, StartsWith, Contains, EndsWith --> <MatchStringCriterion >ENUMTYPE</MatchStringCriterion> <!-- required --> <LastName >STRTYPE</LastName> <!-- required --> </LastNameFilter> <!-- OR --> <LastNameRangeFilter> <!-- optional --> <FromLastName >STRTYPE</FromLastName> <!-- required --> <ToLastName >STRTYPE</ToLastName> <!-- required --> </LastNameRangeFilter> <!-- END OR --> <!-- BEGIN OR --> <LoginNameFilter> <!-- optional --> <!-- MatchStringCriterion may have one of the following values: Equal, StartsWith, Contains, EndsWith --> <MatchStringCriterion >ENUMTYPE</MatchStringCriterion> <!-- required --> <LoginName >STRTYPE</LoginName> <!-- required --> </LoginNameFilter> <!-- OR --> <LoginNameRangeFilter> <!-- optional --> <FromLoginName >STRTYPE</FromLoginName> <!-- required --> <ToLoginName >STRTYPE</ToLoginName> <!-- required --> </LoginNameRangeFilter> <!-- END OR --> <!-- BEGIN OR --> <NotesFilter> <!-- optional --> <!-- MatchStringCriterion may have one of the following values: Equal, StartsWith, Contains, EndsWith --> <MatchStringCriterion >ENUMTYPE</MatchStringCriterion> <!-- required --> <Notes >STRTYPE</Notes> <!-- required --> </NotesFilter> <!-- OR --> <NotesRangeFilter> <!-- optional --> <FromNotes >STRTYPE</FromNotes> <!-- required --> <ToNotes >STRTYPE</ToNotes> <!-- required --> </NotesRangeFilter> <!-- END OR --> <!-- BEGIN OR --> <PhoneFilter> <!-- optional --> <!-- MatchStringCriterion may have one of the following values: Equal, StartsWith, Contains, EndsWith --> <MatchStringCriterion >ENUMTYPE</MatchStringCriterion> <!-- required --> <Phone >STRTYPE</Phone> <!-- required --> </PhoneFilter> <!-- OR --> <PhoneRangeFilter> <!-- optional --> <FromPhone >STRTYPE</FromPhone> <!-- required --> <ToPhone >STRTYPE</ToPhone> <!-- required --> </PhoneRangeFilter> <!-- END OR --> <!-- BEGIN OR --> <Phone2Filter> <!-- optional --> <!-- MatchStringCriterion may have one of the following values: Equal, StartsWith, Contains, EndsWith --> <MatchStringCriterion >ENUMTYPE</MatchStringCriterion> <!-- required --> <Phone2 >STRTYPE</Phone2> <!-- required --> </Phone2Filter> <!-- OR --> <Phone2RangeFilter> <!-- optional --> <FromPhone2 >STRTYPE</FromPhone2> <!-- required --> <ToPhone2 >STRTYPE</ToPhone2> <!-- required --> </Phone2RangeFilter> <!-- END OR --> <!-- BEGIN OR --> <Phone3Filter> <!-- optional --> <!-- MatchStringCriterion may have one of the following values: Equal, StartsWith, Contains, EndsWith --> <MatchStringCriterion >ENUMTYPE</MatchStringCriterion> <!-- required --> <Phone3 >STRTYPE</Phone3> <!-- required --> </Phone3Filter> <!-- OR --> <Phone3RangeFilter> <!-- optional --> <FromPhone3 >STRTYPE</FromPhone3> <!-- required --> <ToPhone3 >STRTYPE</ToPhone3> <!-- required --> </Phone3RangeFilter> <!-- END OR --> <!-- BEGIN OR --> <Phone4Filter> <!-- optional --> <!-- MatchStringCriterion may have one of the following values: Equal, StartsWith, Contains, EndsWith --> <MatchStringCriterion >ENUMTYPE</MatchStringCriterion> <!-- required --> <Phone4 >STRTYPE</Phone4> <!-- required --> </Phone4Filter> <!-- OR --> <Phone4RangeFilter> <!-- optional --> <FromPhone4 >STRTYPE</FromPhone4> <!-- required --> <ToPhone4 >STRTYPE</ToPhone4> <!-- required --> </Phone4RangeFilter> <!-- END OR --> <!-- BEGIN OR --> <PostalCodeFilter> <!-- optional --> <!-- MatchStringCriterion may have one of the following values: Equal, StartsWith, Contains, EndsWith --> <MatchStringCriterion >ENUMTYPE</MatchStringCriterion> <!-- required --> <PostalCode >STRTYPE</PostalCode> <!-- required --> </PostalCodeFilter> <!-- OR --> <PostalCodeRangeFilter> <!-- optional --> <FromPostalCode >STRTYPE</FromPostalCode> <!-- required --> <ToPostalCode >STRTYPE</ToPostalCode> <!-- required --> </PostalCodeRangeFilter> <!-- END OR --> <!-- BEGIN OR --> <StateFilter> <!-- optional --> <!-- MatchStringCriterion may have one of the following values: Equal, StartsWith, Contains, EndsWith --> <MatchStringCriterion >ENUMTYPE</MatchStringCriterion> <!-- required --> <State >STRTYPE</State> <!-- required --> </StateFilter> <!-- OR --> <StateRangeFilter> <!-- optional --> <FromState >STRTYPE</FromState> <!-- required --> <ToState >STRTYPE</ToState> <!-- required --> </StateRangeFilter> <!-- END OR --> <!-- BEGIN OR --> <StreetFilter> <!-- optional --> <!-- MatchStringCriterion may have one of the following values: Equal, StartsWith, Contains, EndsWith --> <MatchStringCriterion >ENUMTYPE</MatchStringCriterion> <!-- required --> <Street >STRTYPE</Street> <!-- required --> </StreetFilter> <!-- OR --> <StreetRangeFilter> <!-- optional --> <FromStreet >STRTYPE</FromStreet> <!-- required --> <ToStreet >STRTYPE</ToStreet> <!-- required --> </StreetRangeFilter> <!-- END OR --> <!-- BEGIN OR --> <Street2Filter> <!-- optional --> <!-- MatchStringCriterion may have one of the following values: Equal, StartsWith, Contains, EndsWith --> <MatchStringCriterion >ENUMTYPE</MatchStringCriterion> <!-- required --> <Street2 >STRTYPE</Street2> <!-- required --> </Street2Filter> <!-- OR --> <Street2RangeFilter> <!-- optional --> <FromStreet2 >STRTYPE</FromStreet2> <!-- required --> <ToStreet2 >STRTYPE</ToStreet2> <!-- required --> </Street2RangeFilter> <!-- END OR --> <!-- BEGIN OR --> <SecurityGroupFilter> <!-- optional --> <!-- MatchStringCriterion may have one of the following values: Equal, StartsWith, Contains, EndsWith --> <MatchStringCriterion >ENUMTYPE</MatchStringCriterion> <!-- required --> <SecurityGroup >STRTYPE</SecurityGroup> <!-- required --> </SecurityGroupFilter> <!-- OR --> <SecurityGroupRangeFilter> <!-- optional --> <FromSecurityGroup >STRTYPE</FromSecurityGroup> <!-- required --> <ToSecurityGroup >STRTYPE</ToSecurityGroup> <!-- required --> </SecurityGroupRangeFilter> <!-- END OR --> <IncludeRetElement >STRTYPE</IncludeRetElement> <!-- optional, may repeat --> </EmployeeQueryRq> <EmployeeQueryRs statusCode="INTTYPE" statusSeverity="STRTYPE" statusMessage="STRTYPE" retCount="INTTYPE" iteratorRemainingCount="INTTYPE" iteratorID="UUIDTYPE"> <EmployeeRet> <!-- optional, may repeat --> <ListID >IDTYPE</ListID> <!-- optional --> <TimeCreated >DATETIMETYPE</TimeCreated> <!-- optional --> <TimeModified >DATETIMETYPE</TimeModified> <!-- optional --> <City >STRTYPE</City> <!-- optional --> <CommissionPercent >FLOATTYPE</CommissionPercent> <!-- optional --> <Country >STRTYPE</Country> <!-- optional --> <EMail >STRTYPE</EMail> <!-- optional --> <FirstName >STRTYPE</FirstName> <!-- optional --> <IsTrackingHours >BOOLTYPE</IsTrackingHours> <!-- optional --> <LastName >STRTYPE</LastName> <!-- optional --> <LoginName >STRTYPE</LoginName> <!-- optional --> <Notes >STRTYPE</Notes> <!-- optional --> <Phone >STRTYPE</Phone> <!-- optional --> <Phone2 >STRTYPE</Phone2> <!-- optional --> <Phone3 >STRTYPE</Phone3> <!-- optional --> <Phone4 >STRTYPE</Phone4> <!-- optional --> <PostalCode >STRTYPE</PostalCode> <!-- optional --> <State >STRTYPE</State> <!-- optional --> <Street >STRTYPE</Street> <!-- optional --> <Street2 >STRTYPE</Street2> <!-- optional --> <SecurityGroup >STRTYPE</SecurityGroup> <!-- optional --> <DataExtRet> <!-- optional, may repeat --> <OwnerID >GUIDTYPE</OwnerID> <!-- required --> <DataExtName >STRTYPE</DataExtName> <!-- required --> <!-- DataExtType may have one of the following values: INTTYPE, AMTTYPE, PRICETYPE, QUANTYPE, PERCENTTYPE, DATETIMETYPE, STR255TYPE, STR1024TYPE --> <DataExtType >ENUMTYPE</DataExtType> <!-- required --> <DataExtValue >STRTYPE</DataExtValue> <!-- required --> </DataExtRet> </EmployeeRet> </EmployeeQueryRs> </QBPOSXMLMsgsRq> </QBPOSXML> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 | 'The following sample code is generated as an illustration of
'Creating requests and parsing responses ONLY
'This code is NOT intended to show best practices or ideal code
'Use at your most careful discretion
imports System
imports System.Net
imports System.Drawing
imports System.Collections
imports System.ComponentModel
imports System.Windows.Forms
imports System.Data
imports System.IO
imports Interop.qbposfc4
Public Class SampleEmployeeQuery
Public Sub DoEmployeeQuery()
Dim sessionBegun as Boolean
sessionBegun = False
Dim connectionOpen as Boolean
connectionOpen = False
Dim sessionManager as QBPOSSessionManager
sessionManager = nothing
Try
'Create the session Manager object
sessionManager = new QBPOSSessionManager
'Create the message set request object to hold our request
Dim requestMsgSet as IMsgSetRequest
requestMsgSet = sessionManager.CreateMsgSetRequest(4,0)
requestMsgSet.Attributes.OnError = ENRqOnError.roeContinue
BuildEmployeeQueryRq(requestMsgSet)
'Connect to QuickBooks and begin a session
sessionManager.OpenConnection("","Sample Code from OSR")
connectionOpen = True
sessionManager.BeginSession("")
sessionBegun = True
'Send the request and get the response from QuickBooks
Dim responseMsgSet as IMsgSetResponse
responseMsgSet = sessionManager.DoRequests(requestMsgSet)
'End the session and close the connection to QuickBooks
sessionManager.EndSession()
sessionBegun = False
sessionManager.CloseConnection()
connectionOpen = False
WalkEmployeeQueryRs(responseMsgSet)
Catch e as Exception
MessageBox.Show(e.Message, "Error")
if (sessionBegun) then
sessionManager.EndSession()
End If
if (connectionOpen) then
sessionManager.CloseConnection()
End If
End Try
End Sub
Public Sub BuildEmployeeQueryRq(requestMsgSet as IMsgSetRequest)
Dim EmployeeQueryRq as IEmployeeQuery
EmployeeQueryRq= requestMsgSet.AppendEmployeeQueryRq()
'Set field value for MaxReturned
EmployeeQueryRq.MaxReturned.SetValue(6)
'Set field value for OwnerIDList
'May create more than one of these if needed
EmployeeQueryRq.OwnerIDList.Add(System.Guid.NewGuid().ToString())
'Set field value for ListID
EmployeeQueryRq.ListID.SetValue("200000-1011023419")
Dim ORTimeCreatedFiltersElementType801 as String
ORTimeCreatedFiltersElementType801 = "TimeCreatedFilter"
if (ORTimeCreatedFiltersElementType801 = "TimeCreatedFilter") then
'Set field value for MatchNumericCriterion
EmployeeQueryRq.ORTimeCreatedFilters.TimeCreatedFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan)
'Set field value for TimeCreated
EmployeeQueryRq.ORTimeCreatedFilters.TimeCreatedFilter.TimeCreated.SetValue(DateTime.Parse("12/15/2007 12:15:12"),false)
End If
if (ORTimeCreatedFiltersElementType801 = "TimeCreatedRangeFilter") then
'Set field value for FromTimeCreated
EmployeeQueryRq.ORTimeCreatedFilters.TimeCreatedRangeFilter.FromTimeCreated.SetValue(DateTime.Parse("12/15/2007 12:15:12"),false)
'Set field value for ToTimeCreated
EmployeeQueryRq.ORTimeCreatedFilters.TimeCreatedRangeFilter.ToTimeCreated.SetValue(DateTime.Parse("12/15/2007 12:15:12"),false)
End If
Dim ORTimeModifiedFiltersElementType802 as String
ORTimeModifiedFiltersElementType802 = "TimeModifiedFilter"
if (ORTimeModifiedFiltersElementType802 = "TimeModifiedFilter") then
'Set field value for MatchNumericCriterion
EmployeeQueryRq.ORTimeModifiedFilters.TimeModifiedFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan)
'Set field value for TimeModified
EmployeeQueryRq.ORTimeModifiedFilters.TimeModifiedFilter.TimeModified.SetValue(DateTime.Parse("12/15/2007 12:15:12"),false)
End If
if (ORTimeModifiedFiltersElementType802 = "TimeModifiedRangeFilter") then
'Set field value for FromTimeModified
EmployeeQueryRq.ORTimeModifiedFilters.TimeModifiedRangeFilter.FromTimeModified.SetValue(DateTime.Parse("12/15/2007 12:15:12"),false)
'Set field value for ToTimeModified
EmployeeQueryRq.ORTimeModifiedFilters.TimeModifiedRangeFilter.ToTimeModified.SetValue(DateTime.Parse("12/15/2007 12:15:12"),false)
End If
Dim ORCityFiltersElementType803 as String
ORCityFiltersElementType803 = "CityFilter"
if (ORCityFiltersElementType803 = "CityFilter") then
'Set field value for MatchStringCriterion
EmployeeQueryRq.ORCityFilters.CityFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual)
'Set field value for City
EmployeeQueryRq.ORCityFilters.CityFilter.City.SetValue("ab")
End If
if (ORCityFiltersElementType803 = "CityRangeFilter") then
'Set field value for FromCity
EmployeeQueryRq.ORCityFilters.CityRangeFilter.FromCity.SetValue("ab")
'Set field value for ToCity
EmployeeQueryRq.ORCityFilters.CityRangeFilter.ToCity.SetValue("ab")
End If
Dim ORCommissionPercentFiltersElementType804 as String
ORCommissionPercentFiltersElementType804 = "CommissionPercentFilter"
if (ORCommissionPercentFiltersElementType804 = "CommissionPercentFilter") then
'Set field value for MatchNumericCriterion
EmployeeQueryRq.ORCommissionPercentFilters.CommissionPercentFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan)
'Set field value for CommissionPercent
EmployeeQueryRq.ORCommissionPercentFilters.CommissionPercentFilter.CommissionPercent.SetValue(12.34)
End If
if (ORCommissionPercentFiltersElementType804 = "CommissionPercentRangeFilter") then
'Set field value for FromCommissionPercent
EmployeeQueryRq.ORCommissionPercentFilters.CommissionPercentRangeFilter.FromCommissionPercent.SetValue(12.34)
'Set field value for ToCommissionPercent
EmployeeQueryRq.ORCommissionPercentFilters.CommissionPercentRangeFilter.ToCommissionPercent.SetValue(12.34)
End If
Dim ORCountryFiltersElementType805 as String
ORCountryFiltersElementType805 = "CountryFilter"
if (ORCountryFiltersElementType805 = "CountryFilter") then
'Set field value for MatchStringCriterion
EmployeeQueryRq.ORCountryFilters.CountryFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual)
'Set field value for Country
EmployeeQueryRq.ORCountryFilters.CountryFilter.Country.SetValue("ab")
End If
if (ORCountryFiltersElementType805 = "CountryRangeFilter") then
'Set field value for FromCountry
EmployeeQueryRq.ORCountryFilters.CountryRangeFilter.FromCountry.SetValue("ab")
'Set field value for ToCountry
EmployeeQueryRq.ORCountryFilters.CountryRangeFilter.ToCountry.SetValue("ab")
End If
Dim OREMailFiltersElementType806 as String
OREMailFiltersElementType806 = "EMailFilter"
if (OREMailFiltersElementType806 = "EMailFilter") then
'Set field value for MatchStringCriterion
EmployeeQueryRq.OREMailFilters.EMailFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual)
'Set field value for EMail
EmployeeQueryRq.OREMailFilters.EMailFilter.EMail.SetValue("ab")
End If
if (OREMailFiltersElementType806 = "EMailRangeFilter") then
'Set field value for FromEMail
EmployeeQueryRq.OREMailFilters.EMailRangeFilter.FromEMail.SetValue("ab")
'Set field value for ToEMail
EmployeeQueryRq.OREMailFilters.EMailRangeFilter.ToEMail.SetValue("ab")
End If
Dim ORFirstNameFiltersElementType807 as String
ORFirstNameFiltersElementType807 = "FirstNameFilter"
if (ORFirstNameFiltersElementType807 = "FirstNameFilter") then
'Set field value for MatchStringCriterion
EmployeeQueryRq.ORFirstNameFilters.FirstNameFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual)
'Set field value for FirstName
EmployeeQueryRq.ORFirstNameFilters.FirstNameFilter.FirstName.SetValue("ab")
End If
if (ORFirstNameFiltersElementType807 = "FirstNameRangeFilter") then
'Set field value for FromFirstName
EmployeeQueryRq.ORFirstNameFilters.FirstNameRangeFilter.FromFirstName.SetValue("ab")
'Set field value for ToFirstName
EmployeeQueryRq.ORFirstNameFilters.FirstNameRangeFilter.ToFirstName.SetValue("ab")
End If
'Set field value for IsTrackingHours
EmployeeQueryRq.IsTrackingHours.SetValue(True)
Dim ORLastNameFiltersElementType808 as String
ORLastNameFiltersElementType808 = "LastNameFilter"
if (ORLastNameFiltersElementType808 = "LastNameFilter") then
'Set field value for MatchStringCriterion
EmployeeQueryRq.ORLastNameFilters.LastNameFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual)
'Set field value for LastName
EmployeeQueryRq.ORLastNameFilters.LastNameFilter.LastName.SetValue("ab")
End If
if (ORLastNameFiltersElementType808 = "LastNameRangeFilter") then
'Set field value for FromLastName
EmployeeQueryRq.ORLastNameFilters.LastNameRangeFilter.FromLastName.SetValue("ab")
'Set field value for ToLastName
EmployeeQueryRq.ORLastNameFilters.LastNameRangeFilter.ToLastName.SetValue("ab")
End If
Dim ORLoginNameFiltersElementType809 as String
ORLoginNameFiltersElementType809 = "LoginNameFilter"
if (ORLoginNameFiltersElementType809 = "LoginNameFilter") then
'Set field value for MatchStringCriterion
EmployeeQueryRq.ORLoginNameFilters.LoginNameFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual)
'Set field value for LoginName
EmployeeQueryRq.ORLoginNameFilters.LoginNameFilter.LoginName.SetValue("ab")
End If
if (ORLoginNameFiltersElementType809 = "LoginNameRangeFilter") then
'Set field value for FromLoginName
EmployeeQueryRq.ORLoginNameFilters.LoginNameRangeFilter.FromLoginName.SetValue("ab")
'Set field value for ToLoginName
EmployeeQueryRq.ORLoginNameFilters.LoginNameRangeFilter.ToLoginName.SetValue("ab")
End If
Dim ORNotesFiltersElementType810 as String
ORNotesFiltersElementType810 = "NotesFilter"
if (ORNotesFiltersElementType810 = "NotesFilter") then
'Set field value for MatchStringCriterion
EmployeeQueryRq.ORNotesFilters.NotesFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual)
'Set field value for Notes
EmployeeQueryRq.ORNotesFilters.NotesFilter.Notes.SetValue("ab")
End If
if (ORNotesFiltersElementType810 = "NotesRangeFilter") then
'Set field value for FromNotes
EmployeeQueryRq.ORNotesFilters.NotesRangeFilter.FromNotes.SetValue("ab")
'Set field value for ToNotes
EmployeeQueryRq.ORNotesFilters.NotesRangeFilter.ToNotes.SetValue("ab")
End If
Dim ORPhoneFiltersElementType811 as String
ORPhoneFiltersElementType811 = "PhoneFilter"
if (ORPhoneFiltersElementType811 = "PhoneFilter") then
'Set field value for MatchStringCriterion
EmployeeQueryRq.ORPhoneFilters.PhoneFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual)
'Set field value for Phone
EmployeeQueryRq.ORPhoneFilters.PhoneFilter.Phone.SetValue("ab")
End If
if (ORPhoneFiltersElementType811 = "PhoneRangeFilter") then
'Set field value for FromPhone
EmployeeQueryRq.ORPhoneFilters.PhoneRangeFilter.FromPhone.SetValue("ab")
'Set field value for ToPhone
EmployeeQueryRq.ORPhoneFilters.PhoneRangeFilter.ToPhone.SetValue("ab")
End If
Dim ORPhone2FiltersElementType812 as String
ORPhone2FiltersElementType812 = "Phone2Filter"
if (ORPhone2FiltersElementType812 = "Phone2Filter") then
'Set field value for MatchStringCriterion
EmployeeQueryRq.ORPhone2Filters.Phone2Filter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual)
'Set field value for Phone2
EmployeeQueryRq.ORPhone2Filters.Phone2Filter.Phone2.SetValue("ab")
End If
if (ORPhone2FiltersElementType812 = "Phone2RangeFilter") then
'Set field value for FromPhone2
EmployeeQueryRq.ORPhone2Filters.Phone2RangeFilter.FromPhone2.SetValue("ab")
'Set field value for ToPhone2
EmployeeQueryRq.ORPhone2Filters.Phone2RangeFilter.ToPhone2.SetValue("ab")
End If
Dim ORPhone3FiltersElementType813 as String
ORPhone3FiltersElementType813 = "Phone3Filter"
if (ORPhone3FiltersElementType813 = "Phone3Filter") then
'Set field value for MatchStringCriterion
EmployeeQueryRq.ORPhone3Filters.Phone3Filter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual)
'Set field value for Phone3
EmployeeQueryRq.ORPhone3Filters.Phone3Filter.Phone3.SetValue("ab")
End If
if (ORPhone3FiltersElementType813 = "Phone3RangeFilter") then
'Set field value for FromPhone3
EmployeeQueryRq.ORPhone3Filters.Phone3RangeFilter.FromPhone3.SetValue("ab")
'Set field value for ToPhone3
EmployeeQueryRq.ORPhone3Filters.Phone3RangeFilter.ToPhone3.SetValue("ab")
End If
Dim ORPhone4FiltersElementType814 as String
ORPhone4FiltersElementType814 = "Phone4Filter"
if (ORPhone4FiltersElementType814 = "Phone4Filter") then
'Set field value for MatchStringCriterion
EmployeeQueryRq.ORPhone4Filters.Phone4Filter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual)
'Set field value for Phone4
EmployeeQueryRq.ORPhone4Filters.Phone4Filter.Phone4.SetValue("ab")
End If
if (ORPhone4FiltersElementType814 = "Phone4RangeFilter") then
'Set field value for FromPhone4
EmployeeQueryRq.ORPhone4Filters.Phone4RangeFilter.FromPhone4.SetValue("ab")
'Set field value for ToPhone4
EmployeeQueryRq.ORPhone4Filters.Phone4RangeFilter.ToPhone4.SetValue("ab")
End If
Dim ORPostalCodeFiltersElementType815 as String
ORPostalCodeFiltersElementType815 = "PostalCodeFilter"
if (ORPostalCodeFiltersElementType815 = "PostalCodeFilter") then
'Set field value for MatchStringCriterion
EmployeeQueryRq.ORPostalCodeFilters.PostalCodeFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual)
'Set field value for PostalCode
EmployeeQueryRq.ORPostalCodeFilters.PostalCodeFilter.PostalCode.SetValue("ab")
End If
if (ORPostalCodeFiltersElementType815 = "PostalCodeRangeFilter") then
'Set field value for FromPostalCode
EmployeeQueryRq.ORPostalCodeFilters.PostalCodeRangeFilter.FromPostalCode.SetValue("ab")
'Set field value for ToPostalCode
EmployeeQueryRq.ORPostalCodeFilters.PostalCodeRangeFilter.ToPostalCode.SetValue("ab")
End If
Dim ORStateFiltersElementType816 as String
ORStateFiltersElementType816 = "StateFilter"
if (ORStateFiltersElementType816 = "StateFilter") then
'Set field value for MatchStringCriterion
EmployeeQueryRq.ORStateFilters.StateFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual)
'Set field value for State
EmployeeQueryRq.ORStateFilters.StateFilter.State.SetValue("ab")
End If
if (ORStateFiltersElementType816 = "StateRangeFilter") then
'Set field value for FromState
EmployeeQueryRq.ORStateFilters.StateRangeFilter.FromState.SetValue("ab")
'Set field value for ToState
EmployeeQueryRq.ORStateFilters.StateRangeFilter.ToState.SetValue("ab")
End If
Dim ORStreetFiltersElementType817 as String
ORStreetFiltersElementType817 = "StreetFilter"
if (ORStreetFiltersElementType817 = "StreetFilter") then
'Set field value for MatchStringCriterion
EmployeeQueryRq.ORStreetFilters.StreetFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual)
'Set field value for Street
EmployeeQueryRq.ORStreetFilters.StreetFilter.Street.SetValue("ab")
End If
if (ORStreetFiltersElementType817 = "StreetRangeFilter") then
'Set field value for FromStreet
EmployeeQueryRq.ORStreetFilters.StreetRangeFilter.FromStreet.SetValue("ab")
'Set field value for ToStreet
EmployeeQueryRq.ORStreetFilters.StreetRangeFilter.ToStreet.SetValue("ab")
End If
Dim ORStreet2FiltersElementType818 as String
ORStreet2FiltersElementType818 = "Street2Filter"
if (ORStreet2FiltersElementType818 = "Street2Filter") then
'Set field value for MatchStringCriterion
EmployeeQueryRq.ORStreet2Filters.Street2Filter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual)
'Set field value for Street2
EmployeeQueryRq.ORStreet2Filters.Street2Filter.Street2.SetValue("ab")
End If
if (ORStreet2FiltersElementType818 = "Street2RangeFilter") then
'Set field value for FromStreet2
EmployeeQueryRq.ORStreet2Filters.Street2RangeFilter.FromStreet2.SetValue("ab")
'Set field value for ToStreet2
EmployeeQueryRq.ORStreet2Filters.Street2RangeFilter.ToStreet2.SetValue("ab")
End If
Dim ORSecurityGroupFiltersElementType819 as String
ORSecurityGroupFiltersElementType819 = "SecurityGroupFilter"
if (ORSecurityGroupFiltersElementType819 = "SecurityGroupFilter") then
'Set field value for MatchStringCriterion
EmployeeQueryRq.ORSecurityGroupFilters.SecurityGroupFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual)
'Set field value for SecurityGroup
EmployeeQueryRq.ORSecurityGroupFilters.SecurityGroupFilter.SecurityGroup.SetValue("ab")
End If
if (ORSecurityGroupFiltersElementType819 = "SecurityGroupRangeFilter") then
'Set field value for FromSecurityGroup
EmployeeQueryRq.ORSecurityGroupFilters.SecurityGroupRangeFilter.FromSecurityGroup.SetValue("ab")
'Set field value for ToSecurityGroup
EmployeeQueryRq.ORSecurityGroupFilters.SecurityGroupRangeFilter.ToSecurityGroup.SetValue("ab")
End If
'Set field value for IncludeRetElementList
'May create more than one of these if needed
EmployeeQueryRq.IncludeRetElementList.Add("ab")
End Sub
Public Sub WalkEmployeeQueryRs( responseMsgSet as IMsgSetResponse)
if (responseMsgSet is nothing) then
Exit Sub
End If
Dim responseList as IResponseList
responseList = responseMsgSet.ResponseList
if (responseList is nothing) then
Exit Sub
End If
'if we sent only one request, there is only one response, we'll walk the list for this sample
for j=0 to responseList.Count-1
Dim response as IResponse
response = responseList.GetAt(j)
'check the status code of the response, 0=ok, >0 is warning
if (response.StatusCode >= 0) then
'the request-specific response is in the details, make sure we have some
if (not response.Detail is nothing) then
'make sure the response is the type we're expecting
Dim responseType as ENResponseType
responseType = CType(response.Type.GetValue(),ENResponseType)
if (responseType = ENResponseType.rtEmployeeQueryRs) then
'upcast to more specific type here, this is safe because we checked with response.Type check above
Dim EmployeeRet as IEmployeeRetList
EmployeeRet = CType(response.Detail,IEmployeeRetList)
for z=0 to EmployeeRet.Count-1
WalkEmployeeRet(EmployeeRet.GetAt(z))
Next z
End If
End If
End If
Next j
End Sub
Public Sub WalkEmployeeRet(EmployeeRet as IEmployeeRet)
if (EmployeeRet is nothing) then
Exit Sub
End If
'Go through all the elements of IEmployeeRetList
'Get value of ListID
if ( not EmployeeRet.ListID is nothing) then
Dim ListID820 as String
ListID820 = EmployeeRet.ListID.GetValue()
End If
'Get value of TimeCreated
if ( not EmployeeRet.TimeCreated is nothing) then
Dim TimeCreated821 as DateTime
TimeCreated821 = EmployeeRet.TimeCreated.GetValue()
End If
'Get value of TimeModified
if ( not EmployeeRet.TimeModified is nothing) then
Dim TimeModified822 as DateTime
TimeModified822 = EmployeeRet.TimeModified.GetValue()
End If
'Get value of City
if ( not EmployeeRet.City is nothing) then
Dim City823 as String
City823 = EmployeeRet.City.GetValue()
End If
'Get value of CommissionPercent
if ( not EmployeeRet.CommissionPercent is nothing) then
Dim CommissionPercent824 as Single
CommissionPercent824 = EmployeeRet.CommissionPercent.GetValue()
End If
'Get value of Country
if ( not EmployeeRet.Country is nothing) then
Dim Country825 as String
Country825 = EmployeeRet.Country.GetValue()
End If
'Get value of EMail
if ( not EmployeeRet.EMail is nothing) then
Dim EMail826 as String
EMail826 = EmployeeRet.EMail.GetValue()
End If
'Get value of FirstName
if ( not EmployeeRet.FirstName is nothing) then
Dim FirstName827 as String
FirstName827 = EmployeeRet.FirstName.GetValue()
End If
'Get value of IsTrackingHours
if ( not EmployeeRet.IsTrackingHours is nothing) then
Dim IsTrackingHours828 as Boolean
IsTrackingHours828 = EmployeeRet.IsTrackingHours.GetValue()
End If
'Get value of LastName
if ( not EmployeeRet.LastName is nothing) then
Dim LastName829 as String
LastName829 = EmployeeRet.LastName.GetValue()
End If
'Get value of LoginName
if ( not EmployeeRet.LoginName is nothing) then
Dim LoginName830 as String
LoginName830 = EmployeeRet.LoginName.GetValue()
End If
'Get value of Notes
if ( not EmployeeRet.Notes is nothing) then
Dim Notes831 as String
Notes831 = EmployeeRet.Notes.GetValue()
End If
'Get value of Phone
if ( not EmployeeRet.Phone is nothing) then
Dim Phone832 as String
Phone832 = EmployeeRet.Phone.GetValue()
End If
'Get value of Phone2
if ( not EmployeeRet.Phone2 is nothing) then
Dim Phone2833 as String
Phone2833 = EmployeeRet.Phone2.GetValue()
End If
'Get value of Phone3
if ( not EmployeeRet.Phone3 is nothing) then
Dim Phone3834 as String
Phone3834 = EmployeeRet.Phone3.GetValue()
End If
'Get value of Phone4
if ( not EmployeeRet.Phone4 is nothing) then
Dim Phone4835 as String
Phone4835 = EmployeeRet.Phone4.GetValue()
End If
'Get value of PostalCode
if ( not EmployeeRet.PostalCode is nothing) then
Dim PostalCode836 as String
PostalCode836 = EmployeeRet.PostalCode.GetValue()
End If
'Get value of State
if ( not EmployeeRet.State is nothing) then
Dim State837 as String
State837 = EmployeeRet.State.GetValue()
End If
'Get value of Street
if ( not EmployeeRet.Street is nothing) then
Dim Street838 as String
Street838 = EmployeeRet.Street.GetValue()
End If
'Get value of Street2
if ( not EmployeeRet.Street2 is nothing) then
Dim Street2839 as String
Street2839 = EmployeeRet.Street2.GetValue()
End If
'Get value of SecurityGroup
if ( not EmployeeRet.SecurityGroup is nothing) then
Dim SecurityGroup840 as String
SecurityGroup840 = EmployeeRet.SecurityGroup.GetValue()
End If
if (not EmployeeRet.DataExtRetList is nothing)
Dim i841 as Integer
for i841 = 0 to EmployeeRet.DataExtRetList.Count - 1
Dim DataExtRet as IDataExtRet
DataExtRet = EmployeeRet.DataExtRetList.GetAt(i841)
'Get value of OwnerID
Dim OwnerID842 as String
OwnerID842 = DataExtRet.OwnerID.GetValue()
'Get value of DataExtName
Dim DataExtName843 as String
DataExtName843 = DataExtRet.DataExtName.GetValue()
'Get value of DataExtType
Dim DataExtType844 as ENDataExtType
DataExtType844 = DataExtRet.DataExtType.GetValue()
'Get value of DataExtValue
Dim DataExtValue845 as String
DataExtValue845 = DataExtRet.DataExtValue.GetValue()
Next i841
End If
End Sub
End Class
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 | //The following sample code is generated as an illustration of //Creating requests and parsing responses ONLY //This code is NOT intended to show best practices or ideal code //Use at your most careful discretion using System; using System.Net; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Data; using System.IO; using Interop.qbposfc4; namespace com.intuit.idn.samples { public class SampleEmployeeQuery { public void DoEmployeeQuery() { bool sessionBegun = false; bool connectionOpen = false; QBPOSSessionManager sessionManager = null; try { //Create the session Manager object sessionManager = new QBPOSSessionManager(); //Create the message set request object to hold our request IMsgSetRequest requestMsgSet = sessionManager.CreateMsgSetRequest(4,0); requestMsgSet.Attributes.OnError = ENRqOnError.roeContinue; BuildEmployeeQueryRq(requestMsgSet); //Connect to QuickBooks and begin a session sessionManager.OpenConnection("","Sample Code from OSR"); connectionOpen = true; sessionManager.BeginSession(""); sessionBegun = true; //Send the request and get the response from QuickBooks IMsgSetResponse responseMsgSet = sessionManager.DoRequests(requestMsgSet); //End the session and close the connection to QuickBooks sessionManager.EndSession(); sessionBegun = false; sessionManager.CloseConnection(); connectionOpen = false; WalkEmployeeQueryRs(responseMsgSet); } catch (Exception e) { MessageBox.Show(e.Message, "Error"); if (sessionBegun) { sessionManager.EndSession(); } if (connectionOpen) { sessionManager.CloseConnection(); } } } void BuildEmployeeQueryRq(IMsgSetRequest requestMsgSet) { IEmployeeQuery EmployeeQueryRq= requestMsgSet.AppendEmployeeQueryRq(); //Set attributes //Set field value for metaData EmployeeQueryRq.metaData.SetValue(ENmetaData.mdMetaDataAndResponseData); //Set field value for iterator EmployeeQueryRq.iterator.SetValue(ENiterator.itStart); //Set field value for iteratorID EmployeeQueryRq.iteratorID.SetValue("{D7355385-A17B-4f5d-B34D-F34C79C3E6FC}"); //Set field value for MaxReturned EmployeeQueryRq.MaxReturned.SetValue(6); //Set field value for OwnerIDList //May create more than one of these if needed EmployeeQueryRq.OwnerIDList.Add(Guid.NewGuid().ToString()); //Set field value for ListID EmployeeQueryRq.ListID.SetValue("200000-1011023419"); string ORTimeCreatedFiltersElementType846 = "TimeCreatedFilter"; if (ORTimeCreatedFiltersElementType846 == "TimeCreatedFilter") { //Set field value for MatchNumericCriterion EmployeeQueryRq.ORTimeCreatedFilters.TimeCreatedFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan); //Set field value for TimeCreated EmployeeQueryRq.ORTimeCreatedFilters.TimeCreatedFilter.TimeCreated.SetValue(DateTime.Parse("12/15/2007 12:15:12"),false); } if (ORTimeCreatedFiltersElementType846 == "TimeCreatedRangeFilter") { //Set field value for FromTimeCreated EmployeeQueryRq.ORTimeCreatedFilters.TimeCreatedRangeFilter.FromTimeCreated.SetValue(DateTime.Parse("12/15/2007 12:15:12"),false); //Set field value for ToTimeCreated EmployeeQueryRq.ORTimeCreatedFilters.TimeCreatedRangeFilter.ToTimeCreated.SetValue(DateTime.Parse("12/15/2007 12:15:12"),false); } string ORTimeModifiedFiltersElementType847 = "TimeModifiedFilter"; if (ORTimeModifiedFiltersElementType847 == "TimeModifiedFilter") { //Set field value for MatchNumericCriterion EmployeeQueryRq.ORTimeModifiedFilters.TimeModifiedFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan); //Set field value for TimeModified EmployeeQueryRq.ORTimeModifiedFilters.TimeModifiedFilter.TimeModified.SetValue(DateTime.Parse("12/15/2007 12:15:12"),false); } if (ORTimeModifiedFiltersElementType847 == "TimeModifiedRangeFilter") { //Set field value for FromTimeModified EmployeeQueryRq.ORTimeModifiedFilters.TimeModifiedRangeFilter.FromTimeModified.SetValue(DateTime.Parse("12/15/2007 12:15:12"),false); //Set field value for ToTimeModified EmployeeQueryRq.ORTimeModifiedFilters.TimeModifiedRangeFilter.ToTimeModified.SetValue(DateTime.Parse("12/15/2007 12:15:12"),false); } string ORCityFiltersElementType848 = "CityFilter"; if (ORCityFiltersElementType848 == "CityFilter") { //Set field value for MatchStringCriterion EmployeeQueryRq.ORCityFilters.CityFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual); //Set field value for City EmployeeQueryRq.ORCityFilters.CityFilter.City.SetValue("ab"); } if (ORCityFiltersElementType848 == "CityRangeFilter") { //Set field value for FromCity EmployeeQueryRq.ORCityFilters.CityRangeFilter.FromCity.SetValue("ab"); //Set field value for ToCity EmployeeQueryRq.ORCityFilters.CityRangeFilter.ToCity.SetValue("ab"); } string ORCommissionPercentFiltersElementType849 = "CommissionPercentFilter"; if (ORCommissionPercentFiltersElementType849 == "CommissionPercentFilter") { //Set field value for MatchNumericCriterion EmployeeQueryRq.ORCommissionPercentFilters.CommissionPercentFilter.MatchNumericCriterion.SetValue(ENMatchNumericCriterion.mncLessThan); //Set field value for CommissionPercent EmployeeQueryRq.ORCommissionPercentFilters.CommissionPercentFilter.CommissionPercent.SetValue(12.34F); } if (ORCommissionPercentFiltersElementType849 == "CommissionPercentRangeFilter") { //Set field value for FromCommissionPercent EmployeeQueryRq.ORCommissionPercentFilters.CommissionPercentRangeFilter.FromCommissionPercent.SetValue(12.34F); //Set field value for ToCommissionPercent EmployeeQueryRq.ORCommissionPercentFilters.CommissionPercentRangeFilter.ToCommissionPercent.SetValue(12.34F); } string ORCountryFiltersElementType850 = "CountryFilter"; if (ORCountryFiltersElementType850 == "CountryFilter") { //Set field value for MatchStringCriterion EmployeeQueryRq.ORCountryFilters.CountryFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual); //Set field value for Country EmployeeQueryRq.ORCountryFilters.CountryFilter.Country.SetValue("ab"); } if (ORCountryFiltersElementType850 == "CountryRangeFilter") { //Set field value for FromCountry EmployeeQueryRq.ORCountryFilters.CountryRangeFilter.FromCountry.SetValue("ab"); //Set field value for ToCountry EmployeeQueryRq.ORCountryFilters.CountryRangeFilter.ToCountry.SetValue("ab"); } string OREMailFiltersElementType851 = "EMailFilter"; if (OREMailFiltersElementType851 == "EMailFilter") { //Set field value for MatchStringCriterion EmployeeQueryRq.OREMailFilters.EMailFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual); //Set field value for EMail EmployeeQueryRq.OREMailFilters.EMailFilter.EMail.SetValue("ab"); } if (OREMailFiltersElementType851 == "EMailRangeFilter") { //Set field value for FromEMail EmployeeQueryRq.OREMailFilters.EMailRangeFilter.FromEMail.SetValue("ab"); //Set field value for ToEMail EmployeeQueryRq.OREMailFilters.EMailRangeFilter.ToEMail.SetValue("ab"); } string ORFirstNameFiltersElementType852 = "FirstNameFilter"; if (ORFirstNameFiltersElementType852 == "FirstNameFilter") { //Set field value for MatchStringCriterion EmployeeQueryRq.ORFirstNameFilters.FirstNameFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual); //Set field value for FirstName EmployeeQueryRq.ORFirstNameFilters.FirstNameFilter.FirstName.SetValue("ab"); } if (ORFirstNameFiltersElementType852 == "FirstNameRangeFilter") { //Set field value for FromFirstName EmployeeQueryRq.ORFirstNameFilters.FirstNameRangeFilter.FromFirstName.SetValue("ab"); //Set field value for ToFirstName EmployeeQueryRq.ORFirstNameFilters.FirstNameRangeFilter.ToFirstName.SetValue("ab"); } //Set field value for IsTrackingHours EmployeeQueryRq.IsTrackingHours.SetValue(true); string ORLastNameFiltersElementType853 = "LastNameFilter"; if (ORLastNameFiltersElementType853 == "LastNameFilter") { //Set field value for MatchStringCriterion EmployeeQueryRq.ORLastNameFilters.LastNameFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual); //Set field value for LastName EmployeeQueryRq.ORLastNameFilters.LastNameFilter.LastName.SetValue("ab"); } if (ORLastNameFiltersElementType853 == "LastNameRangeFilter") { //Set field value for FromLastName EmployeeQueryRq.ORLastNameFilters.LastNameRangeFilter.FromLastName.SetValue("ab"); //Set field value for ToLastName EmployeeQueryRq.ORLastNameFilters.LastNameRangeFilter.ToLastName.SetValue("ab"); } string ORLoginNameFiltersElementType854 = "LoginNameFilter"; if (ORLoginNameFiltersElementType854 == "LoginNameFilter") { //Set field value for MatchStringCriterion EmployeeQueryRq.ORLoginNameFilters.LoginNameFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual); //Set field value for LoginName EmployeeQueryRq.ORLoginNameFilters.LoginNameFilter.LoginName.SetValue("ab"); } if (ORLoginNameFiltersElementType854 == "LoginNameRangeFilter") { //Set field value for FromLoginName EmployeeQueryRq.ORLoginNameFilters.LoginNameRangeFilter.FromLoginName.SetValue("ab"); //Set field value for ToLoginName EmployeeQueryRq.ORLoginNameFilters.LoginNameRangeFilter.ToLoginName.SetValue("ab"); } string ORNotesFiltersElementType855 = "NotesFilter"; if (ORNotesFiltersElementType855 == "NotesFilter") { //Set field value for MatchStringCriterion EmployeeQueryRq.ORNotesFilters.NotesFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual); //Set field value for Notes EmployeeQueryRq.ORNotesFilters.NotesFilter.Notes.SetValue("ab"); } if (ORNotesFiltersElementType855 == "NotesRangeFilter") { //Set field value for FromNotes EmployeeQueryRq.ORNotesFilters.NotesRangeFilter.FromNotes.SetValue("ab"); //Set field value for ToNotes EmployeeQueryRq.ORNotesFilters.NotesRangeFilter.ToNotes.SetValue("ab"); } string ORPhoneFiltersElementType856 = "PhoneFilter"; if (ORPhoneFiltersElementType856 == "PhoneFilter") { //Set field value for MatchStringCriterion EmployeeQueryRq.ORPhoneFilters.PhoneFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual); //Set field value for Phone EmployeeQueryRq.ORPhoneFilters.PhoneFilter.Phone.SetValue("ab"); } if (ORPhoneFiltersElementType856 == "PhoneRangeFilter") { //Set field value for FromPhone EmployeeQueryRq.ORPhoneFilters.PhoneRangeFilter.FromPhone.SetValue("ab"); //Set field value for ToPhone EmployeeQueryRq.ORPhoneFilters.PhoneRangeFilter.ToPhone.SetValue("ab"); } string ORPhone2FiltersElementType857 = "Phone2Filter"; if (ORPhone2FiltersElementType857 == "Phone2Filter") { //Set field value for MatchStringCriterion EmployeeQueryRq.ORPhone2Filters.Phone2Filter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual); //Set field value for Phone2 EmployeeQueryRq.ORPhone2Filters.Phone2Filter.Phone2.SetValue("ab"); } if (ORPhone2FiltersElementType857 == "Phone2RangeFilter") { //Set field value for FromPhone2 EmployeeQueryRq.ORPhone2Filters.Phone2RangeFilter.FromPhone2.SetValue("ab"); //Set field value for ToPhone2 EmployeeQueryRq.ORPhone2Filters.Phone2RangeFilter.ToPhone2.SetValue("ab"); } string ORPhone3FiltersElementType858 = "Phone3Filter"; if (ORPhone3FiltersElementType858 == "Phone3Filter") { //Set field value for MatchStringCriterion EmployeeQueryRq.ORPhone3Filters.Phone3Filter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual); //Set field value for Phone3 EmployeeQueryRq.ORPhone3Filters.Phone3Filter.Phone3.SetValue("ab"); } if (ORPhone3FiltersElementType858 == "Phone3RangeFilter") { //Set field value for FromPhone3 EmployeeQueryRq.ORPhone3Filters.Phone3RangeFilter.FromPhone3.SetValue("ab"); //Set field value for ToPhone3 EmployeeQueryRq.ORPhone3Filters.Phone3RangeFilter.ToPhone3.SetValue("ab"); } string ORPhone4FiltersElementType859 = "Phone4Filter"; if (ORPhone4FiltersElementType859 == "Phone4Filter") { //Set field value for MatchStringCriterion EmployeeQueryRq.ORPhone4Filters.Phone4Filter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual); //Set field value for Phone4 EmployeeQueryRq.ORPhone4Filters.Phone4Filter.Phone4.SetValue("ab"); } if (ORPhone4FiltersElementType859 == "Phone4RangeFilter") { //Set field value for FromPhone4 EmployeeQueryRq.ORPhone4Filters.Phone4RangeFilter.FromPhone4.SetValue("ab"); //Set field value for ToPhone4 EmployeeQueryRq.ORPhone4Filters.Phone4RangeFilter.ToPhone4.SetValue("ab"); } string ORPostalCodeFiltersElementType860 = "PostalCodeFilter"; if (ORPostalCodeFiltersElementType860 == "PostalCodeFilter") { //Set field value for MatchStringCriterion EmployeeQueryRq.ORPostalCodeFilters.PostalCodeFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual); //Set field value for PostalCode EmployeeQueryRq.ORPostalCodeFilters.PostalCodeFilter.PostalCode.SetValue("ab"); } if (ORPostalCodeFiltersElementType860 == "PostalCodeRangeFilter") { //Set field value for FromPostalCode EmployeeQueryRq.ORPostalCodeFilters.PostalCodeRangeFilter.FromPostalCode.SetValue("ab"); //Set field value for ToPostalCode EmployeeQueryRq.ORPostalCodeFilters.PostalCodeRangeFilter.ToPostalCode.SetValue("ab"); } string ORStateFiltersElementType861 = "StateFilter"; if (ORStateFiltersElementType861 == "StateFilter") { //Set field value for MatchStringCriterion EmployeeQueryRq.ORStateFilters.StateFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual); //Set field value for State EmployeeQueryRq.ORStateFilters.StateFilter.State.SetValue("ab"); } if (ORStateFiltersElementType861 == "StateRangeFilter") { //Set field value for FromState EmployeeQueryRq.ORStateFilters.StateRangeFilter.FromState.SetValue("ab"); //Set field value for ToState EmployeeQueryRq.ORStateFilters.StateRangeFilter.ToState.SetValue("ab"); } string ORStreetFiltersElementType862 = "StreetFilter"; if (ORStreetFiltersElementType862 == "StreetFilter") { //Set field value for MatchStringCriterion EmployeeQueryRq.ORStreetFilters.StreetFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual); //Set field value for Street EmployeeQueryRq.ORStreetFilters.StreetFilter.Street.SetValue("ab"); } if (ORStreetFiltersElementType862 == "StreetRangeFilter") { //Set field value for FromStreet EmployeeQueryRq.ORStreetFilters.StreetRangeFilter.FromStreet.SetValue("ab"); //Set field value for ToStreet EmployeeQueryRq.ORStreetFilters.StreetRangeFilter.ToStreet.SetValue("ab"); } string ORStreet2FiltersElementType863 = "Street2Filter"; if (ORStreet2FiltersElementType863 == "Street2Filter") { //Set field value for MatchStringCriterion EmployeeQueryRq.ORStreet2Filters.Street2Filter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual); //Set field value for Street2 EmployeeQueryRq.ORStreet2Filters.Street2Filter.Street2.SetValue("ab"); } if (ORStreet2FiltersElementType863 == "Street2RangeFilter") { //Set field value for FromStreet2 EmployeeQueryRq.ORStreet2Filters.Street2RangeFilter.FromStreet2.SetValue("ab"); //Set field value for ToStreet2 EmployeeQueryRq.ORStreet2Filters.Street2RangeFilter.ToStreet2.SetValue("ab"); } string ORSecurityGroupFiltersElementType864 = "SecurityGroupFilter"; if (ORSecurityGroupFiltersElementType864 == "SecurityGroupFilter") { //Set field value for MatchStringCriterion EmployeeQueryRq.ORSecurityGroupFilters.SecurityGroupFilter.MatchStringCriterion.SetValue(ENMatchStringCriterion.mscEqual); //Set field value for SecurityGroup EmployeeQueryRq.ORSecurityGroupFilters.SecurityGroupFilter.SecurityGroup.SetValue("ab"); } if (ORSecurityGroupFiltersElementType864 == "SecurityGroupRangeFilter") { //Set field value for FromSecurityGroup EmployeeQueryRq.ORSecurityGroupFilters.SecurityGroupRangeFilter.FromSecurityGroup.SetValue("ab"); //Set field value for ToSecurityGroup EmployeeQueryRq.ORSecurityGroupFilters.SecurityGroupRangeFilter.ToSecurityGroup.SetValue("ab"); } //Set field value for IncludeRetElementList //May create more than one of these if needed EmployeeQueryRq.IncludeRetElementList.Add("ab"); } void WalkEmployeeQueryRs(IMsgSetResponse responseMsgSet) { if (responseMsgSet == null) return; IResponseList responseList = responseMsgSet.ResponseList; if (responseList == null) return; //if we sent only one request, there is only one response, we'll walk the list for this sample for(int i=0; i < responseList.Count; i++) { IResponse response = responseList.GetAt(i); //check the status code of the response, 0=ok, >0 is warning if (response.StatusCode >= 0) { //the request-specific response is in the details, make sure we have some if (response.Detail != null) { //make sure the response is the type we're expecting ENResponseType responseType = (ENResponseType)response.Type.GetValue(); if (responseType == ENResponseType.rtEmployeeQueryRs) { //upcast to more specific type here, this is safe because we checked with response.Type check above IEmployeeRetList EmployeeRet = (IEmployeeRetList)response.Detail; for(int z=0; z < EmployeeRet.Count; z++) { WalkEmployeeRet(EmployeeRet.GetAt(z)); } } } } } } void WalkEmployeeRet(IEmployeeRet EmployeeRet) { if (EmployeeRet == null) return; //Go through all the elements of IEmployeeRetList //Get value of ListID if (EmployeeRet.ListID != null) { string ListID865 = (string)EmployeeRet.ListID.GetValue(); } //Get value of TimeCreated if (EmployeeRet.TimeCreated != null) { DateTime TimeCreated866 = (DateTime)EmployeeRet.TimeCreated.GetValue(); } //Get value of TimeModified if (EmployeeRet.TimeModified != null) { DateTime TimeModified867 = (DateTime)EmployeeRet.TimeModified.GetValue(); } //Get value of City if (EmployeeRet.City != null) { string City868 = (string)EmployeeRet.City.GetValue(); } //Get value of CommissionPercent if (EmployeeRet.CommissionPercent != null) { float CommissionPercent869 = (float)EmployeeRet.CommissionPercent.GetValue(); } //Get value of Country if (EmployeeRet.Country != null) { string Country870 = (string)EmployeeRet.Country.GetValue(); } //Get value of EMail if (EmployeeRet.EMail != null) { string EMail871 = (string)EmployeeRet.EMail.GetValue(); } //Get value of FirstName if (EmployeeRet.FirstName != null) { string FirstName872 = (string)EmployeeRet.FirstName.GetValue(); } //Get value of IsTrackingHours if (EmployeeRet.IsTrackingHours != null) { bool IsTrackingHours873 = (bool)EmployeeRet.IsTrackingHours.GetValue(); } //Get value of LastName if (EmployeeRet.LastName != null) { string LastName874 = (string)EmployeeRet.LastName.GetValue(); } //Get value of LoginName if (EmployeeRet.LoginName != null) { string LoginName875 = (string)EmployeeRet.LoginName.GetValue(); } //Get value of Notes if (EmployeeRet.Notes != null) { string Notes876 = (string)EmployeeRet.Notes.GetValue(); } //Get value of Phone if (EmployeeRet.Phone != null) { string Phone877 = (string)EmployeeRet.Phone.GetValue(); } //Get value of Phone2 if (EmployeeRet.Phone2 != null) { string Phone2878 = (string)EmployeeRet.Phone2.GetValue(); } //Get value of Phone3 if (EmployeeRet.Phone3 != null) { string Phone3879 = (string)EmployeeRet.Phone3.GetValue(); } //Get value of Phone4 if (EmployeeRet.Phone4 != null) { string Phone4880 = (string)EmployeeRet.Phone4.GetValue(); } //Get value of PostalCode if (EmployeeRet.PostalCode != null) { string PostalCode881 = (string)EmployeeRet.PostalCode.GetValue(); } //Get value of State if (EmployeeRet.State != null) { string State882 = (string)EmployeeRet.State.GetValue(); } //Get value of Street if (EmployeeRet.Street != null) { string Street883 = (string)EmployeeRet.Street.GetValue(); } //Get value of Street2 if (EmployeeRet.Street2 != null) { string Street2884 = (string)EmployeeRet.Street2.GetValue(); } //Get value of SecurityGroup if (EmployeeRet.SecurityGroup != null) { string SecurityGroup885 = (string)EmployeeRet.SecurityGroup.GetValue(); } if (EmployeeRet.DataExtRetList != null) { for (int i886 = 0; i886 < EmployeeRet.DataExtRetList.Count; i886++) { IDataExtRet DataExtRet = EmployeeRet.DataExtRetList.GetAt(i886); //Get value of OwnerID string OwnerID887 = (string)DataExtRet.OwnerID.GetValue(); //Get value of DataExtName string DataExtName888 = (string)DataExtRet.DataExtName.GetValue(); //Get value of DataExtType ENDataExtType DataExtType889 = (ENDataExtType)DataExtRet.DataExtType.GetValue(); //Get value of DataExtValue string DataExtValue890 = (string)DataExtRet.DataExtValue.GetValue(); } } } } } |