Modifies and existing employee.
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 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 | <?xml version="1.0" encoding="utf-8"?> <?qbxml version="17.0"?> <QBXML> <QBXMLMsgsRq onError="stopOnError"> <EmployeeModRq> <EmployeeMod> <!-- required --> <ListID >IDTYPE</ListID> <!-- required --> <EditSequence >STRTYPE</EditSequence> <!-- required --> <IsActive >BOOLTYPE</IsActive> <!-- optional --> <Salutation >STRTYPE</Salutation> <!-- optional --> <FirstName >STRTYPE</FirstName> <!-- optional --> <MiddleName >STRTYPE</MiddleName> <!-- optional --> <LastName >STRTYPE</LastName> <!-- optional --> <JobTitle >STRTYPE</JobTitle> <!-- optional --> <SupervisorRef> <!-- optional --> <ListID >IDTYPE</ListID> <!-- optional --> <FullName >STRTYPE</FullName> <!-- optional --> </SupervisorRef> <Department >STRTYPE</Department> <!-- optional --> <Description >STRTYPE</Description> <!-- optional --> <TargetBonus >AMTTYPE</TargetBonus> <!-- optional --> <EmployeeAddress> <!-- optional --> <Addr1 >STRTYPE</Addr1> <!-- optional --> <Addr2 >STRTYPE</Addr2> <!-- optional --> <City >STRTYPE</City> <!-- optional --> <State >STRTYPE</State> <!-- optional --> <PostalCode >STRTYPE</PostalCode> <!-- optional --> </EmployeeAddress> <PrintAs >STRTYPE</PrintAs> <!-- optional --> <Phone >STRTYPE</Phone> <!-- optional --> <Mobile >STRTYPE</Mobile> <!-- optional --> <Pager >STRTYPE</Pager> <!-- optional --> <PagerPIN >STRTYPE</PagerPIN> <!-- optional --> <AltPhone >STRTYPE</AltPhone> <!-- optional --> <Fax >STRTYPE</Fax> <!-- optional --> <Email >STRTYPE</Email> <!-- optional --> <AdditionalContactRef> <!-- must occur 0 - 8 times --> <ContactName >STRTYPE</ContactName> <!-- required --> <ContactValue >STRTYPE</ContactValue> <!-- required --> </AdditionalContactRef> <EmergencyContacts> <!-- optional --> <PrimaryContact> <!-- optional --> <ContactName >STRTYPE</ContactName> <!-- required --> <ContactValue >STRTYPE</ContactValue> <!-- required --> <!-- Relation may have one of the following values: Spouse, Partner, Mother, Father, Sister, Brother, Son, Daughter, Friend, Other --> <Relation >ENUMTYPE</Relation> <!-- optional --> </PrimaryContact> <SecondaryContact> <!-- optional --> <ContactName >STRTYPE</ContactName> <!-- required --> <ContactValue >STRTYPE</ContactValue> <!-- required --> <!-- Relation may have one of the following values: Spouse, Partner, Mother, Father, Sister, Brother, Son, Daughter, Friend, Other --> <Relation >ENUMTYPE</Relation> <!-- optional --> </SecondaryContact> </EmergencyContacts> <!-- EmployeeType may have one of the following values: Officer, Owner, Regular [DEFAULT], Statutory --> <EmployeeType >ENUMTYPE</EmployeeType> <!-- optional --> <!-- PartOrFullTime may have one of the following values: PartTime, FullTime --> <PartOrFullTime >ENUMTYPE</PartOrFullTime> <!-- optional --> <!-- Exempt may have one of the following values: Exempt, NonExempt --> <Exempt >ENUMTYPE</Exempt> <!-- optional --> <!-- KeyEmployee may have one of the following values: Yes, No --> <KeyEmployee >ENUMTYPE</KeyEmployee> <!-- optional --> <HiredDate >DATETYPE</HiredDate> <!-- optional --> <OriginalHireDate >DATETYPE</OriginalHireDate> <!-- optional --> <AdjustedServiceDate >DATETYPE</AdjustedServiceDate> <!-- optional --> <ReleasedDate >DATETYPE</ReleasedDate> <!-- optional --> <BirthDate >DATETYPE</BirthDate> <!-- optional --> <!-- USCitizen may have one of the following values: Yes, No --> <USCitizen >ENUMTYPE</USCitizen> <!-- optional --> <!-- Ethnicity may have one of the following values: AmericianIndian, Asian, Black, Hawaiian, Hispanic, White, TwoOrMoreRaces --> <Ethnicity >ENUMTYPE</Ethnicity> <!-- optional --> <!-- Disabled may have one of the following values: Yes, No --> <Disabled >ENUMTYPE</Disabled> <!-- optional --> <DisabilityDesc >STRTYPE</DisabilityDesc> <!-- optional --> <!-- OnFile may have one of the following values: Yes, No --> <OnFile >ENUMTYPE</OnFile> <!-- optional --> <WorkAuthExpireDate >DATETYPE</WorkAuthExpireDate> <!-- optional --> <!-- USVeteran may have one of the following values: Yes, No --> <USVeteran >ENUMTYPE</USVeteran> <!-- optional --> <!-- MilitaryStatus may have one of the following values: Active, Reserve --> <MilitaryStatus >ENUMTYPE</MilitaryStatus> <!-- optional --> <AccountNumber >STRTYPE</AccountNumber> <!-- optional --> <Notes >STRTYPE</Notes> <!-- optional --> <AdditionalNotesMod> <!-- optional, may repeat --> <NoteID >INTTYPE</NoteID> <!-- required --> <Note >STRTYPE</Note> <!-- required --> </AdditionalNotesMod> <BillingRateRef> <!-- optional --> <ListID >IDTYPE</ListID> <!-- optional --> <FullName >STRTYPE</FullName> <!-- optional --> </BillingRateRef> <EmployeePayrollInfoMod> <!-- optional --> <!-- PayPeriod may have one of the following values: Daily, Weekly, Biweekly, Semimonthly, Monthly, Quarterly, Yearly --> <PayPeriod >ENUMTYPE</PayPeriod> <!-- optional --> <ClassRef> <!-- optional --> <ListID >IDTYPE</ListID> <!-- optional --> <FullName >STRTYPE</FullName> <!-- optional --> </ClassRef> <!-- BEGIN OR --> <ClearEarnings >BOOLTYPE</ClearEarnings> <!-- optional --> <!-- OR --> <Earnings> <!-- optional, may repeat --> <PayrollItemWageRef> <!-- required --> <ListID >IDTYPE</ListID> <!-- optional --> <FullName >STRTYPE</FullName> <!-- optional --> </PayrollItemWageRef> <!-- BEGIN OR --> <Rate >PRICETYPE</Rate> <!-- optional --> <!-- OR --> <RatePercent >PERCENTTYPE</RatePercent> <!-- optional --> <!-- END OR --> </Earnings> <!-- END OR --> <IsUsingTimeDataToCreatePaychecks >BOOLTYPE</IsUsingTimeDataToCreatePaychecks> <!-- optional --> <!-- UseTimeDataToCreatePaychecks may have one of the following values: NotSet, UseTimeData, DoNotUseTimeData --> <UseTimeDataToCreatePaychecks >ENUMTYPE</UseTimeDataToCreatePaychecks> <!-- optional --> <SickHours> <!-- optional --> <HoursAvailable >TIMEINTERVALTYPE</HoursAvailable> <!-- optional --> <!-- AccrualPeriod may have one of the following values: BeginningOfYear, EveryHourOnPaycheck, EveryPaycheck --> <AccrualPeriod >ENUMTYPE</AccrualPeriod> <!-- optional --> <HoursAccrued >TIMEINTERVALTYPE</HoursAccrued> <!-- optional --> <MaximumHours >TIMEINTERVALTYPE</MaximumHours> <!-- optional --> <IsResettingHoursEachNewYear >BOOLTYPE</IsResettingHoursEachNewYear> <!-- optional --> <HoursUsed >TIMEINTERVALTYPE</HoursUsed> <!-- optional --> <AccrualStartDate >DATETYPE</AccrualStartDate> <!-- optional --> </SickHours> <VacationHours> <!-- optional --> <HoursAvailable >TIMEINTERVALTYPE</HoursAvailable> <!-- optional --> <!-- AccrualPeriod may have one of the following values: BeginningOfYear, EveryHourOnPaycheck, EveryPaycheck --> <AccrualPeriod >ENUMTYPE</AccrualPeriod> <!-- optional --> <HoursAccrued >TIMEINTERVALTYPE</HoursAccrued> <!-- optional --> <MaximumHours >TIMEINTERVALTYPE</MaximumHours> <!-- optional --> <IsResettingHoursEachNewYear >BOOLTYPE</IsResettingHoursEachNewYear> <!-- optional --> <HoursUsed >TIMEINTERVALTYPE</HoursUsed> <!-- optional --> <AccrualStartDate >DATETYPE</AccrualStartDate> <!-- optional --> </VacationHours> </EmployeePayrollInfoMod> </EmployeeMod> <IncludeRetElement >STRTYPE</IncludeRetElement> <!-- optional, may repeat --> </EmployeeModRq> <EmployeeModRs statusCode="INTTYPE" statusSeverity="STRTYPE" statusMessage="STRTYPE"> <EmployeeRet> <!-- optional --> <ListID >IDTYPE</ListID> <!-- required --> <TimeCreated >DATETIMETYPE</TimeCreated> <!-- required --> <TimeModified >DATETIMETYPE</TimeModified> <!-- required --> <EditSequence >STRTYPE</EditSequence> <!-- required --> <Name >STRTYPE</Name> <!-- required --> <IsActive >BOOLTYPE</IsActive> <!-- optional --> <Salutation >STRTYPE</Salutation> <!-- optional --> <FirstName >STRTYPE</FirstName> <!-- optional --> <MiddleName >STRTYPE</MiddleName> <!-- optional --> <LastName >STRTYPE</LastName> <!-- optional --> <JobTitle >STRTYPE</JobTitle> <!-- optional --> <SupervisorRef> <!-- optional --> <ListID >IDTYPE</ListID> <!-- optional --> <FullName >STRTYPE</FullName> <!-- optional --> </SupervisorRef> <Department >STRTYPE</Department> <!-- optional --> <Description >STRTYPE</Description> <!-- optional --> <TargetBonus >AMTTYPE</TargetBonus> <!-- optional --> <EmployeeAddress> <!-- optional --> <Addr1 >STRTYPE</Addr1> <!-- optional --> <Addr2 >STRTYPE</Addr2> <!-- optional --> <City >STRTYPE</City> <!-- optional --> <State >STRTYPE</State> <!-- optional --> <PostalCode >STRTYPE</PostalCode> <!-- optional --> </EmployeeAddress> <PrintAs >STRTYPE</PrintAs> <!-- optional --> <Phone >STRTYPE</Phone> <!-- optional --> <Mobile >STRTYPE</Mobile> <!-- optional --> <Pager >STRTYPE</Pager> <!-- optional --> <PagerPIN >STRTYPE</PagerPIN> <!-- optional --> <AltPhone >STRTYPE</AltPhone> <!-- optional --> <Fax >STRTYPE</Fax> <!-- optional --> <SSN >STRTYPE</SSN> <!-- optional --> <Email >STRTYPE</Email> <!-- optional --> <AdditionalContactRef> <!-- must occur 0 - 8 times --> <ContactName >STRTYPE</ContactName> <!-- required --> <ContactValue >STRTYPE</ContactValue> <!-- required --> </AdditionalContactRef> <EmergencyContacts> <!-- optional --> <PrimaryContact> <!-- optional --> <ContactName >STRTYPE</ContactName> <!-- required --> <ContactValue >STRTYPE</ContactValue> <!-- required --> <!-- Relation may have one of the following values: Spouse, Partner, Mother, Father, Sister, Brother, Son, Daughter, Friend, Other --> <Relation >ENUMTYPE</Relation> <!-- optional --> </PrimaryContact> <SecondaryContact> <!-- optional --> <ContactName >STRTYPE</ContactName> <!-- required --> <ContactValue >STRTYPE</ContactValue> <!-- required --> <!-- Relation may have one of the following values: Spouse, Partner, Mother, Father, Sister, Brother, Son, Daughter, Friend, Other --> <Relation >ENUMTYPE</Relation> <!-- optional --> </SecondaryContact> </EmergencyContacts> <!-- EmployeeType may have one of the following values: Officer, Owner, Regular [DEFAULT], Statutory --> <EmployeeType >ENUMTYPE</EmployeeType> <!-- optional --> <!-- PartOrFullTime may have one of the following values: PartTime, FullTime --> <PartOrFullTime >ENUMTYPE</PartOrFullTime> <!-- optional --> <!-- Exempt may have one of the following values: Exempt, NonExempt --> <Exempt >ENUMTYPE</Exempt> <!-- optional --> <!-- KeyEmployee may have one of the following values: Yes, No --> <KeyEmployee >ENUMTYPE</KeyEmployee> <!-- optional --> <!-- Gender may have one of the following values: Male, Female --> <Gender >ENUMTYPE</Gender> <!-- optional --> <HiredDate >DATETYPE</HiredDate> <!-- optional --> <OriginalHireDate >DATETYPE</OriginalHireDate> <!-- optional --> <AdjustedServiceDate >DATETYPE</AdjustedServiceDate> <!-- optional --> <ReleasedDate >DATETYPE</ReleasedDate> <!-- optional --> <BirthDate >DATETYPE</BirthDate> <!-- optional --> <!-- USCitizen may have one of the following values: Yes, No --> <USCitizen >ENUMTYPE</USCitizen> <!-- optional --> <!-- Ethnicity may have one of the following values: AmericianIndian, Asian, Black, Hawaiian, Hispanic, White, TwoOrMoreRaces --> <Ethnicity >ENUMTYPE</Ethnicity> <!-- optional --> <!-- Disabled may have one of the following values: Yes, No --> <Disabled >ENUMTYPE</Disabled> <!-- optional --> <DisabilityDesc >STRTYPE</DisabilityDesc> <!-- optional --> <!-- OnFile may have one of the following values: Yes, No --> <OnFile >ENUMTYPE</OnFile> <!-- optional --> <WorkAuthExpireDate >DATETYPE</WorkAuthExpireDate> <!-- optional --> <!-- USVeteran may have one of the following values: Yes, No --> <USVeteran >ENUMTYPE</USVeteran> <!-- optional --> <!-- MilitaryStatus may have one of the following values: Active, Reserve --> <MilitaryStatus >ENUMTYPE</MilitaryStatus> <!-- optional --> <AccountNumber >STRTYPE</AccountNumber> <!-- optional --> <Notes >STRTYPE</Notes> <!-- optional --> <AdditionalNotesRet> <!-- optional, may repeat --> <NoteID >INTTYPE</NoteID> <!-- required --> <Date >DATETYPE</Date> <!-- required --> <Note >STRTYPE</Note> <!-- required --> </AdditionalNotesRet> <BillingRateRef> <!-- optional --> <ListID >IDTYPE</ListID> <!-- optional --> <FullName >STRTYPE</FullName> <!-- optional --> </BillingRateRef> <EmployeePayrollInfo> <!-- optional --> <!-- PayPeriod may have one of the following values: Daily, Weekly, Biweekly, Semimonthly, Monthly, Quarterly, Yearly --> <PayPeriod >ENUMTYPE</PayPeriod> <!-- optional --> <ClassRef> <!-- optional --> <ListID >IDTYPE</ListID> <!-- optional --> <FullName >STRTYPE</FullName> <!-- optional --> </ClassRef> <!-- BEGIN OR --> <ClearEarnings >BOOLTYPE</ClearEarnings> <!-- optional --> <!-- OR --> <Earnings> <!-- optional, may repeat --> <PayrollItemWageRef> <!-- required --> <ListID >IDTYPE</ListID> <!-- optional --> <FullName >STRTYPE</FullName> <!-- optional --> </PayrollItemWageRef> <!-- BEGIN OR --> <Rate >PRICETYPE</Rate> <!-- optional --> <!-- OR --> <RatePercent >PERCENTTYPE</RatePercent> <!-- optional --> <!-- END OR --> </Earnings> <!-- END OR --> <IsUsingTimeDataToCreatePaychecks >BOOLTYPE</IsUsingTimeDataToCreatePaychecks> <!-- optional --> <!-- UseTimeDataToCreatePaychecks may have one of the following values: NotSet, UseTimeData, DoNotUseTimeData --> <UseTimeDataToCreatePaychecks >ENUMTYPE</UseTimeDataToCreatePaychecks> <!-- optional --> <SickHours> <!-- optional --> <HoursAvailable >TIMEINTERVALTYPE</HoursAvailable> <!-- optional --> <!-- AccrualPeriod may have one of the following values: BeginningOfYear, EveryHourOnPaycheck, EveryPaycheck --> <AccrualPeriod >ENUMTYPE</AccrualPeriod> <!-- optional --> <HoursAccrued >TIMEINTERVALTYPE</HoursAccrued> <!-- optional --> <MaximumHours >TIMEINTERVALTYPE</MaximumHours> <!-- optional --> <IsResettingHoursEachNewYear >BOOLTYPE</IsResettingHoursEachNewYear> <!-- optional --> <HoursUsed >TIMEINTERVALTYPE</HoursUsed> <!-- optional --> <AccrualStartDate >DATETYPE</AccrualStartDate> <!-- optional --> </SickHours> <VacationHours> <!-- optional --> <HoursAvailable >TIMEINTERVALTYPE</HoursAvailable> <!-- optional --> <!-- AccrualPeriod may have one of the following values: BeginningOfYear, EveryHourOnPaycheck, EveryPaycheck --> <AccrualPeriod >ENUMTYPE</AccrualPeriod> <!-- optional --> <HoursAccrued >TIMEINTERVALTYPE</HoursAccrued> <!-- optional --> <MaximumHours >TIMEINTERVALTYPE</MaximumHours> <!-- optional --> <IsResettingHoursEachNewYear >BOOLTYPE</IsResettingHoursEachNewYear> <!-- optional --> <HoursUsed >TIMEINTERVALTYPE</HoursUsed> <!-- optional --> <AccrualStartDate >DATETYPE</AccrualStartDate> <!-- optional --> </VacationHours> </EmployeePayrollInfo> <ExternalGUID >GUIDTYPE</ExternalGUID> <!-- optional --> <DataExtRet> <!-- optional, may repeat --> <OwnerID >GUIDTYPE</OwnerID> <!-- optional --> <DataExtName >STRTYPE</DataExtName> <!-- required --> <!-- DataExtType may have one of the following values: AMTTYPE, DATETIMETYPE, INTTYPE, PERCENTTYPE, PRICETYPE, QUANTYPE, STR1024TYPE, STR255TYPE --> <DataExtType >ENUMTYPE</DataExtType> <!-- required --> <DataExtValue >STRTYPE</DataExtValue> <!-- required --> </DataExtRet> </EmployeeRet> <ErrorRecovery> <!-- optional --> <!-- BEGIN OR --> <ListID >IDTYPE</ListID> <!-- optional --> <!-- OR --> <OwnerID >GUIDTYPE</OwnerID> <!-- optional --> <!-- OR --> <TxnID >IDTYPE</TxnID> <!-- optional --> <!-- END OR --> <TxnNumber >INTTYPE</TxnNumber> <!-- optional --> <EditSequence >STRTYPE</EditSequence> <!-- optional --> <ExternalGUID >GUIDTYPE</ExternalGUID> <!-- optional --> </ErrorRecovery> </EmployeeModRs> </QBXMLMsgsRq> </QBXML> |
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 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 | '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.QBFC16
Module com.intuit.idn.samples
Public Class Sample
Public Sub DoEmployeeMod()
Dim sessionBegun as Boolean
sessionBegun = False
Dim connectionOpen as Boolean
connectionOpen = False
Dim sessionManager as QBSessionManager
sessionManager = nothing
Try
'Create the session Manager object
sessionManager = new QBSessionManager
'Create the message set request object to hold our request
Dim requestMsgSet as IMsgSetRequest
requestMsgSet = sessionManager.CreateMsgSetRequest("US",16,0)
requestMsgSet.Attributes.OnError = ENRqOnError.roeContinue
BuildEmployeeModRq(requestMsgSet)
'Connect to QuickBooks and begin a session
sessionManager.OpenConnection("","Sample Code from OSR")
connectionOpen = True
sessionManager.BeginSession("", ENOpenMode.omDontCare)
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
WalkEmployeeModRs(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 BuildEmployeeModRq(requestMsgSet as IMsgSetRequest)
Dim EmployeeModRq as IEmployeeMod
EmployeeModRq= requestMsgSet.AppendEmployeeModRq()
'Set field value for ListID
EmployeeModRq.ListID.SetValue("200000-1011023419")
'Set field value for EditSequence
EmployeeModRq.EditSequence.SetValue("ab")
'Set field value for IsActive
EmployeeModRq.IsActive.SetValue(True)
'Set field value for Salutation
EmployeeModRq.Salutation.SetValue("ab")
'Set field value for FirstName
EmployeeModRq.FirstName.SetValue("ab")
'Set field value for MiddleName
EmployeeModRq.MiddleName.SetValue("ab")
'Set field value for LastName
EmployeeModRq.LastName.SetValue("ab")
'Set field value for JobTitle
EmployeeModRq.JobTitle.SetValue("ab")
'Set field value for ListID
EmployeeModRq.SupervisorRef.ListID.SetValue("200000-1011023419")
'Set field value for FullName
EmployeeModRq.SupervisorRef.FullName.SetValue("ab")
'Set field value for Department
EmployeeModRq.Department.SetValue("ab")
'Set field value for Description
EmployeeModRq.Description.SetValue("ab")
'Set field value for TargetBonus
EmployeeModRq.TargetBonus.SetValue(10.01)
'Set field value for Addr1
EmployeeModRq.EmployeeAddress.Addr1.SetValue("ab")
'Set field value for Addr2
EmployeeModRq.EmployeeAddress.Addr2.SetValue("ab")
'Set field value for City
EmployeeModRq.EmployeeAddress.City.SetValue("ab")
'Set field value for State
EmployeeModRq.EmployeeAddress.State.SetValue("ab")
'Set field value for PostalCode
EmployeeModRq.EmployeeAddress.PostalCode.SetValue("ab")
'Set field value for PrintAs
EmployeeModRq.PrintAs.SetValue("ab")
'Set field value for Phone
EmployeeModRq.Phone.SetValue("ab")
'Set field value for Mobile
EmployeeModRq.Mobile.SetValue("ab")
'Set field value for Pager
EmployeeModRq.Pager.SetValue("ab")
'Set field value for PagerPIN
EmployeeModRq.PagerPIN.SetValue("ab")
'Set field value for AltPhone
EmployeeModRq.AltPhone.SetValue("ab")
'Set field value for Fax
EmployeeModRq.Fax.SetValue("ab")
'Set field value for Email
EmployeeModRq.Email.SetValue("ab")
Dim AdditionalContactRef8526 as IQBBaseRef
AdditionalContactRef8526=EmployeeModRq.AdditionalContactRefList.Append()
'Set field value for ContactName
AdditionalContactRef8526.ContactName.SetValue("ab")
'Set field value for ContactValue
AdditionalContactRef8526.ContactValue.SetValue("ab")
'Set field value for ContactName
EmployeeModRq.EmergencyContacts.PrimaryContact.ContactName.SetValue("ab")
'Set field value for ContactValue
EmployeeModRq.EmergencyContacts.PrimaryContact.ContactValue.SetValue("ab")
'Set field value for Relation
EmployeeModRq.EmergencyContacts.PrimaryContact.Relation.SetValue(ENRelation.rSpouse)
'Set field value for ContactName
EmployeeModRq.EmergencyContacts.SecondaryContact.ContactName.SetValue("ab")
'Set field value for ContactValue
EmployeeModRq.EmergencyContacts.SecondaryContact.ContactValue.SetValue("ab")
'Set field value for Relation
EmployeeModRq.EmergencyContacts.SecondaryContact.Relation.SetValue(ENRelation.rSpouse)
'Set field value for EmployeeType
EmployeeModRq.EmployeeType.SetValue(ENEmployeeType.etOfficer)
'Set field value for PartOrFullTime
EmployeeModRq.PartOrFullTime.SetValue(ENPartOrFullTime.poftPartTime)
'Set field value for Exempt
EmployeeModRq.Exempt.SetValue(ENExempt.eExempt)
'Set field value for KeyEmployee
EmployeeModRq.KeyEmployee.SetValue(ENKeyEmployee.keYes)
'Set field value for HiredDate
EmployeeModRq.HiredDate.SetValue(DateTime.Parse("12/15/2007"))
'Set field value for OriginalHireDate
EmployeeModRq.OriginalHireDate.SetValue(DateTime.Parse("12/15/2007"))
'Set field value for AdjustedServiceDate
EmployeeModRq.AdjustedServiceDate.SetValue(DateTime.Parse("12/15/2007"))
'Set field value for ReleasedDate
EmployeeModRq.ReleasedDate.SetValue(DateTime.Parse("12/15/2007"))
'Set field value for BirthDate
EmployeeModRq.BirthDate.SetValue(DateTime.Parse("12/15/2007"))
'Set field value for USCitizen
EmployeeModRq.USCitizen.SetValue(ENUSCitizen.uscYes)
'Set field value for Ethnicity
EmployeeModRq.Ethnicity.SetValue(ENEthnicity.eAmericianIndian)
'Set field value for Disabled
EmployeeModRq.Disabled.SetValue(ENDisabled.dYes)
'Set field value for DisabilityDesc
EmployeeModRq.DisabilityDesc.SetValue("ab")
'Set field value for OnFile
EmployeeModRq.OnFile.SetValue(ENOnFile.ofYes)
'Set field value for WorkAuthExpireDate
EmployeeModRq.WorkAuthExpireDate.SetValue(DateTime.Parse("12/15/2007"))
'Set field value for USVeteran
EmployeeModRq.USVeteran.SetValue(ENUSVeteran.usvYes)
'Set field value for MilitaryStatus
EmployeeModRq.MilitaryStatus.SetValue(ENMilitaryStatus.msActive)
'Set field value for AccountNumber
EmployeeModRq.AccountNumber.SetValue("ab")
'Set field value for Notes
EmployeeModRq.Notes.SetValue("ab")
Dim AdditionalNotesMod8527 as IAdditionalNotesMod
AdditionalNotesMod8527=EmployeeModRq.AdditionalNotesModList.Append()
'Set field value for NoteID
AdditionalNotesMod8527.NoteID.SetValue(6)
'Set field value for Note
AdditionalNotesMod8527.Note.SetValue("ab")
'Set field value for ListID
EmployeeModRq.BillingRateRef.ListID.SetValue("200000-1011023419")
'Set field value for FullName
EmployeeModRq.BillingRateRef.FullName.SetValue("ab")
'Set field value for PayPeriod
EmployeeModRq.EmployeePayrollInfoMod.PayPeriod.SetValue(ENPayPeriod.ppDaily)
'Set field value for ListID
EmployeeModRq.EmployeePayrollInfoMod.ClassRef.ListID.SetValue("200000-1011023419")
'Set field value for FullName
EmployeeModRq.EmployeePayrollInfoMod.ClassRef.FullName.SetValue("ab")
Dim OREarningsElementType8528 as String
OREarningsElementType8528 = "ClearEarnings"
if (OREarningsElementType8528 == "ClearEarnings") then
'Set field value for ClearEarnings
EmployeeModRq.EmployeePayrollInfoMod.OREarnings.ClearEarnings.SetValue(True)
End If
if (OREarningsElementType8528 == "EarningsList") then
Dim Earnings8529 as IEarnings
Earnings8529=EmployeeModRq.EmployeePayrollInfoMod.OREarnings.EarningsList.Append()
'Set field value for ListID
Earnings8529.PayrollItemWageRef.ListID.SetValue("200000-1011023419")
'Set field value for FullName
Earnings8529.PayrollItemWageRef.FullName.SetValue("ab")
Dim ORRateElementType8530 as String
ORRateElementType8530 = "Rate"
if (ORRateElementType8530 == "Rate") then
'Set field value for Rate
Earnings8529.ORRate.Rate.SetValue(15.65)
End If
if (ORRateElementType8530 == "RatePercent") then
'Set field value for RatePercent
Earnings8529.ORRate.RatePercent.SetValue(20.00)
End If
End If
'Set field value for IsUsingTimeDataToCreatePaychecks
EmployeeModRq.EmployeePayrollInfoMod.IsUsingTimeDataToCreatePaychecks.SetValue(True)
'Set field value for UseTimeDataToCreatePaychecks
EmployeeModRq.EmployeePayrollInfoMod.UseTimeDataToCreatePaychecks.SetValue(ENUseTimeDataToCreatePaychecks.utdtcpNotSet)
'Set field value for HoursAvailable
EmployeeModRq.EmployeePayrollInfoMod.SickHours.HoursAvailable.SetValue("IQBTimeIntervalType")
'Set field value for AccrualPeriod
EmployeeModRq.EmployeePayrollInfoMod.SickHours.AccrualPeriod.SetValue(ENAccrualPeriod.apBeginningOfYear)
'Set field value for HoursAccrued
EmployeeModRq.EmployeePayrollInfoMod.SickHours.HoursAccrued.SetValue("IQBTimeIntervalType")
'Set field value for MaximumHours
EmployeeModRq.EmployeePayrollInfoMod.SickHours.MaximumHours.SetValue("IQBTimeIntervalType")
'Set field value for IsResettingHoursEachNewYear
EmployeeModRq.EmployeePayrollInfoMod.SickHours.IsResettingHoursEachNewYear.SetValue(True)
'Set field value for HoursUsed
EmployeeModRq.EmployeePayrollInfoMod.SickHours.HoursUsed.SetValue("IQBTimeIntervalType")
'Set field value for AccrualStartDate
EmployeeModRq.EmployeePayrollInfoMod.SickHours.AccrualStartDate.SetValue(DateTime.Parse("12/15/2007"))
'Set field value for HoursAvailable
EmployeeModRq.EmployeePayrollInfoMod.VacationHours.HoursAvailable.SetValue("IQBTimeIntervalType")
'Set field value for AccrualPeriod
EmployeeModRq.EmployeePayrollInfoMod.VacationHours.AccrualPeriod.SetValue(ENAccrualPeriod.apBeginningOfYear)
'Set field value for HoursAccrued
EmployeeModRq.EmployeePayrollInfoMod.VacationHours.HoursAccrued.SetValue("IQBTimeIntervalType")
'Set field value for MaximumHours
EmployeeModRq.EmployeePayrollInfoMod.VacationHours.MaximumHours.SetValue("IQBTimeIntervalType")
'Set field value for IsResettingHoursEachNewYear
EmployeeModRq.EmployeePayrollInfoMod.VacationHours.IsResettingHoursEachNewYear.SetValue(True)
'Set field value for HoursUsed
EmployeeModRq.EmployeePayrollInfoMod.VacationHours.HoursUsed.SetValue("IQBTimeIntervalType")
'Set field value for AccrualStartDate
EmployeeModRq.EmployeePayrollInfoMod.VacationHours.AccrualStartDate.SetValue(DateTime.Parse("12/15/2007"))
'Set field value for IncludeRetElementList
'May create more than one of these if needed
EmployeeModRq.IncludeRetElementList.Add("ab")
End Sub
Public Sub WalkEmployeeModRs( 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.rtEmployeeModRs) then
'upcast to more specific type here, this is safe because we checked with response.Type check above
Dim EmployeeRet as IEmployeeRet
EmployeeRet = CType(response.Detail,IEmployeeRet)
WalkEmployeeRet(EmployeeRet)
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 IEmployeeRet
'Get value of ListID
Dim ListID8531 as String
ListID8531 = EmployeeRet.ListID.GetValue()
'Get value of TimeCreated
Dim TimeCreated8532 as DateTime
TimeCreated8532 = EmployeeRet.TimeCreated.GetValue()
'Get value of TimeModified
Dim TimeModified8533 as DateTime
TimeModified8533 = EmployeeRet.TimeModified.GetValue()
'Get value of EditSequence
Dim EditSequence8534 as String
EditSequence8534 = EmployeeRet.EditSequence.GetValue()
'Get value of Name
Dim Name8535 as String
Name8535 = EmployeeRet.Name.GetValue()
'Get value of IsActive
if ( not EmployeeRet.IsActive is nothing) then
Dim IsActive8536 as Boolean
IsActive8536 = EmployeeRet.IsActive.GetValue()
End If
'Get value of Salutation
if ( not EmployeeRet.Salutation is nothing) then
Dim Salutation8537 as String
Salutation8537 = EmployeeRet.Salutation.GetValue()
End If
'Get value of FirstName
if ( not EmployeeRet.FirstName is nothing) then
Dim FirstName8538 as String
FirstName8538 = EmployeeRet.FirstName.GetValue()
End If
'Get value of MiddleName
if ( not EmployeeRet.MiddleName is nothing) then
Dim MiddleName8539 as String
MiddleName8539 = EmployeeRet.MiddleName.GetValue()
End If
'Get value of LastName
if ( not EmployeeRet.LastName is nothing) then
Dim LastName8540 as String
LastName8540 = EmployeeRet.LastName.GetValue()
End If
'Get value of JobTitle
if ( not EmployeeRet.JobTitle is nothing) then
Dim JobTitle8541 as String
JobTitle8541 = EmployeeRet.JobTitle.GetValue()
End If
if (not EmployeeRet.SupervisorRef. is nothing) then
'Get value of ListID
if ( not EmployeeRet.SupervisorRef.ListID is nothing) then
Dim ListID8542 as String
ListID8542 = EmployeeRet.SupervisorRef.ListID.GetValue()
End If
'Get value of FullName
if ( not EmployeeRet.SupervisorRef.FullName is nothing) then
Dim FullName8543 as String
FullName8543 = EmployeeRet.SupervisorRef.FullName.GetValue()
End If
End If
'Get value of Department
if ( not EmployeeRet.Department is nothing) then
Dim Department8544 as String
Department8544 = EmployeeRet.Department.GetValue()
End If
'Get value of Description
if ( not EmployeeRet.Description is nothing) then
Dim Description8545 as String
Description8545 = EmployeeRet.Description.GetValue()
End If
'Get value of TargetBonus
if ( not EmployeeRet.TargetBonus is nothing) then
Dim TargetBonus8546 as Double
TargetBonus8546 = EmployeeRet.TargetBonus.GetValue()
End If
if (not EmployeeRet.EmployeeAddress. is nothing) then
'Get value of Addr1
if ( not EmployeeRet.EmployeeAddress.Addr1 is nothing) then
Dim Addr18547 as String
Addr18547 = EmployeeRet.EmployeeAddress.Addr1.GetValue()
End If
'Get value of Addr2
if ( not EmployeeRet.EmployeeAddress.Addr2 is nothing) then
Dim Addr28548 as String
Addr28548 = EmployeeRet.EmployeeAddress.Addr2.GetValue()
End If
'Get value of City
if ( not EmployeeRet.EmployeeAddress.City is nothing) then
Dim City8549 as String
City8549 = EmployeeRet.EmployeeAddress.City.GetValue()
End If
'Get value of State
if ( not EmployeeRet.EmployeeAddress.State is nothing) then
Dim State8550 as String
State8550 = EmployeeRet.EmployeeAddress.State.GetValue()
End If
'Get value of PostalCode
if ( not EmployeeRet.EmployeeAddress.PostalCode is nothing) then
Dim PostalCode8551 as String
PostalCode8551 = EmployeeRet.EmployeeAddress.PostalCode.GetValue()
End If
End If
'Get value of PrintAs
if ( not EmployeeRet.PrintAs is nothing) then
Dim PrintAs8552 as String
PrintAs8552 = EmployeeRet.PrintAs.GetValue()
End If
'Get value of Phone
if ( not EmployeeRet.Phone is nothing) then
Dim Phone8553 as String
Phone8553 = EmployeeRet.Phone.GetValue()
End If
'Get value of Mobile
if ( not EmployeeRet.Mobile is nothing) then
Dim Mobile8554 as String
Mobile8554 = EmployeeRet.Mobile.GetValue()
End If
'Get value of Pager
if ( not EmployeeRet.Pager is nothing) then
Dim Pager8555 as String
Pager8555 = EmployeeRet.Pager.GetValue()
End If
'Get value of PagerPIN
if ( not EmployeeRet.PagerPIN is nothing) then
Dim PagerPIN8556 as String
PagerPIN8556 = EmployeeRet.PagerPIN.GetValue()
End If
'Get value of AltPhone
if ( not EmployeeRet.AltPhone is nothing) then
Dim AltPhone8557 as String
AltPhone8557 = EmployeeRet.AltPhone.GetValue()
End If
'Get value of Fax
if ( not EmployeeRet.Fax is nothing) then
Dim Fax8558 as String
Fax8558 = EmployeeRet.Fax.GetValue()
End If
'Get value of SSN
if ( not EmployeeRet.SSN is nothing) then
Dim SSN8559 as String
SSN8559 = EmployeeRet.SSN.GetValue()
End If
'Get value of Email
if ( not EmployeeRet.Email is nothing) then
Dim Email8560 as String
Email8560 = EmployeeRet.Email.GetValue()
End If
if (not EmployeeRet.AdditionalContactRefList is nothing)
Dim i8561 as Integer
for i8561 = 0 to EmployeeRet.AdditionalContactRefList.Count - 1
Dim QBBaseRef as IQBBaseRef
QBBaseRef = EmployeeRet.AdditionalContactRefList.GetAt(i8561)
'Get value of ContactName
Dim ContactName8562 as String
ContactName8562 = QBBaseRefContactName.GetValue()
'Get value of ContactValue
Dim ContactValue8563 as String
ContactValue8563 = QBBaseRefContactValue.GetValue()
Next i8561
End If
if (not EmployeeRet.EmergencyContacts. is nothing) then
if (not EmployeeRet.EmergencyContacts.PrimaryContact. is nothing) then
'Get value of ContactName
Dim ContactName8564 as String
ContactName8564 = EmployeeRet.EmergencyContacts.PrimaryContact.ContactName.GetValue()
'Get value of ContactValue
Dim ContactValue8565 as String
ContactValue8565 = EmployeeRet.EmergencyContacts.PrimaryContact.ContactValue.GetValue()
'Get value of Relation
if ( not EmployeeRet.EmergencyContacts.PrimaryContact.Relation is nothing) then
Dim Relation8566 as ENRelation
Relation8566 = EmployeeRet.EmergencyContacts.PrimaryContact.Relation.GetValue()
End If
End If
if (not EmployeeRet.EmergencyContacts.SecondaryContact. is nothing) then
'Get value of ContactName
Dim ContactName8567 as String
ContactName8567 = EmployeeRet.EmergencyContacts.SecondaryContact.ContactName.GetValue()
'Get value of ContactValue
Dim ContactValue8568 as String
ContactValue8568 = EmployeeRet.EmergencyContacts.SecondaryContact.ContactValue.GetValue()
'Get value of Relation
if ( not EmployeeRet.EmergencyContacts.SecondaryContact.Relation is nothing) then
Dim Relation8569 as ENRelation
Relation8569 = EmployeeRet.EmergencyContacts.SecondaryContact.Relation.GetValue()
End If
End If
End If
'Get value of EmployeeType
if ( not EmployeeRet.EmployeeType is nothing) then
Dim EmployeeType8570 as ENEmployeeType
EmployeeType8570 = EmployeeRet.EmployeeType.GetValue()
End If
'Get value of PartOrFullTime
if ( not EmployeeRet.PartOrFullTime is nothing) then
Dim PartOrFullTime8571 as ENPartOrFullTime
PartOrFullTime8571 = EmployeeRet.PartOrFullTime.GetValue()
End If
'Get value of Exempt
if ( not EmployeeRet.Exempt is nothing) then
Dim Exempt8572 as ENExempt
Exempt8572 = EmployeeRet.Exempt.GetValue()
End If
'Get value of KeyEmployee
if ( not EmployeeRet.KeyEmployee is nothing) then
Dim KeyEmployee8573 as ENKeyEmployee
KeyEmployee8573 = EmployeeRet.KeyEmployee.GetValue()
End If
'Get value of Gender
if ( not EmployeeRet.Gender is nothing) then
Dim Gender8574 as ENGender
Gender8574 = EmployeeRet.Gender.GetValue()
End If
'Get value of HiredDate
if ( not EmployeeRet.HiredDate is nothing) then
Dim HiredDate8575 as DateTime
HiredDate8575 = EmployeeRet.HiredDate.GetValue()
End If
'Get value of OriginalHireDate
if ( not EmployeeRet.OriginalHireDate is nothing) then
Dim OriginalHireDate8576 as DateTime
OriginalHireDate8576 = EmployeeRet.OriginalHireDate.GetValue()
End If
'Get value of AdjustedServiceDate
if ( not EmployeeRet.AdjustedServiceDate is nothing) then
Dim AdjustedServiceDate8577 as DateTime
AdjustedServiceDate8577 = EmployeeRet.AdjustedServiceDate.GetValue()
End If
'Get value of ReleasedDate
if ( not EmployeeRet.ReleasedDate is nothing) then
Dim ReleasedDate8578 as DateTime
ReleasedDate8578 = EmployeeRet.ReleasedDate.GetValue()
End If
'Get value of BirthDate
if ( not EmployeeRet.BirthDate is nothing) then
Dim BirthDate8579 as DateTime
BirthDate8579 = EmployeeRet.BirthDate.GetValue()
End If
'Get value of USCitizen
if ( not EmployeeRet.USCitizen is nothing) then
Dim USCitizen8580 as ENUSCitizen
USCitizen8580 = EmployeeRet.USCitizen.GetValue()
End If
'Get value of Ethnicity
if ( not EmployeeRet.Ethnicity is nothing) then
Dim Ethnicity8581 as ENEthnicity
Ethnicity8581 = EmployeeRet.Ethnicity.GetValue()
End If
'Get value of Disabled
if ( not EmployeeRet.Disabled is nothing) then
Dim Disabled8582 as ENDisabled
Disabled8582 = EmployeeRet.Disabled.GetValue()
End If
'Get value of DisabilityDesc
if ( not EmployeeRet.DisabilityDesc is nothing) then
Dim DisabilityDesc8583 as String
DisabilityDesc8583 = EmployeeRet.DisabilityDesc.GetValue()
End If
'Get value of OnFile
if ( not EmployeeRet.OnFile is nothing) then
Dim OnFile8584 as ENOnFile
OnFile8584 = EmployeeRet.OnFile.GetValue()
End If
'Get value of WorkAuthExpireDate
if ( not EmployeeRet.WorkAuthExpireDate is nothing) then
Dim WorkAuthExpireDate8585 as DateTime
WorkAuthExpireDate8585 = EmployeeRet.WorkAuthExpireDate.GetValue()
End If
'Get value of USVeteran
if ( not EmployeeRet.USVeteran is nothing) then
Dim USVeteran8586 as ENUSVeteran
USVeteran8586 = EmployeeRet.USVeteran.GetValue()
End If
'Get value of MilitaryStatus
if ( not EmployeeRet.MilitaryStatus is nothing) then
Dim MilitaryStatus8587 as ENMilitaryStatus
MilitaryStatus8587 = EmployeeRet.MilitaryStatus.GetValue()
End If
'Get value of AccountNumber
if ( not EmployeeRet.AccountNumber is nothing) then
Dim AccountNumber8588 as String
AccountNumber8588 = EmployeeRet.AccountNumber.GetValue()
End If
'Get value of Notes
if ( not EmployeeRet.Notes is nothing) then
Dim Notes8589 as String
Notes8589 = EmployeeRet.Notes.GetValue()
End If
if (not EmployeeRet.AdditionalNotesRetList is nothing)
Dim i8590 as Integer
for i8590 = 0 to EmployeeRet.AdditionalNotesRetList.Count - 1
Dim AdditionalNotesRet as IAdditionalNotesRet
AdditionalNotesRet = EmployeeRet.AdditionalNotesRetList.GetAt(i8590)
'Get value of NoteID
Dim NoteID8591 as Integer
NoteID8591 = AdditionalNotesRetNoteID.GetValue()
'Get value of Date
Dim Date8592 as DateTime
Date8592 = AdditionalNotesRetDate.GetValue()
'Get value of Note
Dim Note8593 as String
Note8593 = AdditionalNotesRetNote.GetValue()
Next i8590
End If
if (not EmployeeRet.BillingRateRef. is nothing) then
'Get value of ListID
if ( not EmployeeRet.BillingRateRef.ListID is nothing) then
Dim ListID8594 as String
ListID8594 = EmployeeRet.BillingRateRef.ListID.GetValue()
End If
'Get value of FullName
if ( not EmployeeRet.BillingRateRef.FullName is nothing) then
Dim FullName8595 as String
FullName8595 = EmployeeRet.BillingRateRef.FullName.GetValue()
End If
End If
if (not EmployeeRet.EmployeePayrollInfo. is nothing) then
'Get value of PayPeriod
if ( not EmployeeRet.EmployeePayrollInfo.PayPeriod is nothing) then
Dim PayPeriod8596 as ENPayPeriod
PayPeriod8596 = EmployeeRet.EmployeePayrollInfo.PayPeriod.GetValue()
End If
if (not EmployeeRet.EmployeePayrollInfo.ClassRef. is nothing) then
'Get value of ListID
if ( not EmployeeRet.EmployeePayrollInfo.ClassRef.ListID is nothing) then
Dim ListID8597 as String
ListID8597 = EmployeeRet.EmployeePayrollInfo.ClassRef.ListID.GetValue()
End If
'Get value of FullName
if ( not EmployeeRet.EmployeePayrollInfo.ClassRef.FullName is nothing) then
Dim FullName8598 as String
FullName8598 = EmployeeRet.EmployeePayrollInfo.ClassRef.FullName.GetValue()
End If
End If
if (not EmployeeRet.EmployeePayrollInfo.OREarnings is nothing) then
if (not EmployeeRet.EmployeePayrollInfo.OREarnings.ClearEarnings is nothing) then
'Get value of ClearEarnings
if ( not EmployeeRet.EmployeePayrollInfo.OREarnings.ClearEarnings is nothing) then
Dim ClearEarnings8600 as Boolean
ClearEarnings8600 = EmployeeRet.EmployeePayrollInfo.OREarnings.ClearEarnings.GetValue()
End If
End If
if (not EmployeeRet.EmployeePayrollInfo.OREarnings.EarningsList is nothing) then
if (not EmployeeRet.EmployeePayrollInfo.OREarnings.EarningsList is nothing)
Dim i8601 as Integer
for i8601 = 0 to EmployeeRet.EmployeePayrollInfo.OREarnings.EarningsList.Count - 1
Dim Earnings as IEarnings
Earnings = EmployeeRet.EmployeePayrollInfo.OREarnings.EarningsList.GetAt(i8601)
'Get value of ListID
if ( not EarningsPayrollItemWageRef.ListID is nothing) then
Dim ListID8602 as String
ListID8602 = EarningsPayrollItemWageRef.ListID.GetValue()
End If
'Get value of FullName
if ( not EarningsPayrollItemWageRef.FullName is nothing) then
Dim FullName8603 as String
FullName8603 = EarningsPayrollItemWageRef.FullName.GetValue()
End If
if (not EarningsORRate is nothing) then
if (not EarningsORRate.Rate is nothing) then
'Get value of Rate
if ( not EarningsORRate.Rate is nothing) then
Dim Rate8605 as Double
Rate8605 = EarningsORRate.Rate.GetValue()
End If
End If
if (not EarningsORRate.RatePercent is nothing) then
'Get value of RatePercent
if ( not EarningsORRate.RatePercent is nothing) then
Dim RatePercent8606 as Double
RatePercent8606 = EarningsORRate.RatePercent.GetValue()
End If
End If
End If
Next i8601
End If
End If
End If
'Get value of IsUsingTimeDataToCreatePaychecks
if ( not EmployeeRet.EmployeePayrollInfo.IsUsingTimeDataToCreatePaychecks is nothing) then
Dim IsUsingTimeDataToCreatePaychecks8607 as Boolean
IsUsingTimeDataToCreatePaychecks8607 = EmployeeRet.EmployeePayrollInfo.IsUsingTimeDataToCreatePaychecks.GetValue()
End If
'Get value of UseTimeDataToCreatePaychecks
if ( not EmployeeRet.EmployeePayrollInfo.UseTimeDataToCreatePaychecks is nothing) then
Dim UseTimeDataToCreatePaychecks8608 as ENUseTimeDataToCreatePaychecks
UseTimeDataToCreatePaychecks8608 = EmployeeRet.EmployeePayrollInfo.UseTimeDataToCreatePaychecks.GetValue()
End If
if (not EmployeeRet.EmployeePayrollInfo.SickHours. is nothing) then
'Get value of HoursAvailable
if ( not EmployeeRet.EmployeePayrollInfo.SickHours.HoursAvailable is nothing) then
Dim HoursAvailable8609 as IQBTimeIntervalType
HoursAvailable8609 = EmployeeRet.EmployeePayrollInfo.SickHours.HoursAvailable.GetValue()
End If
'Get value of AccrualPeriod
if ( not EmployeeRet.EmployeePayrollInfo.SickHours.AccrualPeriod is nothing) then
Dim AccrualPeriod8610 as ENAccrualPeriod
AccrualPeriod8610 = EmployeeRet.EmployeePayrollInfo.SickHours.AccrualPeriod.GetValue()
End If
'Get value of HoursAccrued
if ( not EmployeeRet.EmployeePayrollInfo.SickHours.HoursAccrued is nothing) then
Dim HoursAccrued8611 as IQBTimeIntervalType
HoursAccrued8611 = EmployeeRet.EmployeePayrollInfo.SickHours.HoursAccrued.GetValue()
End If
'Get value of MaximumHours
if ( not EmployeeRet.EmployeePayrollInfo.SickHours.MaximumHours is nothing) then
Dim MaximumHours8612 as IQBTimeIntervalType
MaximumHours8612 = EmployeeRet.EmployeePayrollInfo.SickHours.MaximumHours.GetValue()
End If
'Get value of IsResettingHoursEachNewYear
if ( not EmployeeRet.EmployeePayrollInfo.SickHours.IsResettingHoursEachNewYear is nothing) then
Dim IsResettingHoursEachNewYear8613 as Boolean
IsResettingHoursEachNewYear8613 = EmployeeRet.EmployeePayrollInfo.SickHours.IsResettingHoursEachNewYear.GetValue()
End If
'Get value of HoursUsed
if ( not EmployeeRet.EmployeePayrollInfo.SickHours.HoursUsed is nothing) then
Dim HoursUsed8614 as IQBTimeIntervalType
HoursUsed8614 = EmployeeRet.EmployeePayrollInfo.SickHours.HoursUsed.GetValue()
End If
'Get value of AccrualStartDate
if ( not EmployeeRet.EmployeePayrollInfo.SickHours.AccrualStartDate is nothing) then
Dim AccrualStartDate8615 as DateTime
AccrualStartDate8615 = EmployeeRet.EmployeePayrollInfo.SickHours.AccrualStartDate.GetValue()
End If
End If
if (not EmployeeRet.EmployeePayrollInfo.VacationHours. is nothing) then
'Get value of HoursAvailable
if ( not EmployeeRet.EmployeePayrollInfo.VacationHours.HoursAvailable is nothing) then
Dim HoursAvailable8616 as IQBTimeIntervalType
HoursAvailable8616 = EmployeeRet.EmployeePayrollInfo.VacationHours.HoursAvailable.GetValue()
End If
'Get value of AccrualPeriod
if ( not EmployeeRet.EmployeePayrollInfo.VacationHours.AccrualPeriod is nothing) then
Dim AccrualPeriod8617 as ENAccrualPeriod
AccrualPeriod8617 = EmployeeRet.EmployeePayrollInfo.VacationHours.AccrualPeriod.GetValue()
End If
'Get value of HoursAccrued
if ( not EmployeeRet.EmployeePayrollInfo.VacationHours.HoursAccrued is nothing) then
Dim HoursAccrued8618 as IQBTimeIntervalType
HoursAccrued8618 = EmployeeRet.EmployeePayrollInfo.VacationHours.HoursAccrued.GetValue()
End If
'Get value of MaximumHours
if ( not EmployeeRet.EmployeePayrollInfo.VacationHours.MaximumHours is nothing) then
Dim MaximumHours8619 as IQBTimeIntervalType
MaximumHours8619 = EmployeeRet.EmployeePayrollInfo.VacationHours.MaximumHours.GetValue()
End If
'Get value of IsResettingHoursEachNewYear
if ( not EmployeeRet.EmployeePayrollInfo.VacationHours.IsResettingHoursEachNewYear is nothing) then
Dim IsResettingHoursEachNewYear8620 as Boolean
IsResettingHoursEachNewYear8620 = EmployeeRet.EmployeePayrollInfo.VacationHours.IsResettingHoursEachNewYear.GetValue()
End If
'Get value of HoursUsed
if ( not EmployeeRet.EmployeePayrollInfo.VacationHours.HoursUsed is nothing) then
Dim HoursUsed8621 as IQBTimeIntervalType
HoursUsed8621 = EmployeeRet.EmployeePayrollInfo.VacationHours.HoursUsed.GetValue()
End If
'Get value of AccrualStartDate
if ( not EmployeeRet.EmployeePayrollInfo.VacationHours.AccrualStartDate is nothing) then
Dim AccrualStartDate8622 as DateTime
AccrualStartDate8622 = EmployeeRet.EmployeePayrollInfo.VacationHours.AccrualStartDate.GetValue()
End If
End If
End If
'Get value of ExternalGUID
if ( not EmployeeRet.ExternalGUID is nothing) then
Dim ExternalGUID8623 as String
ExternalGUID8623 = EmployeeRet.ExternalGUID.GetValue()
End If
if (not EmployeeRet.DataExtRetList is nothing)
Dim i8624 as Integer
for i8624 = 0 to EmployeeRet.DataExtRetList.Count - 1
Dim DataExtRet as IDataExtRet
DataExtRet = EmployeeRet.DataExtRetList.GetAt(i8624)
'Get value of OwnerID
if ( not DataExtRetOwnerID is nothing) then
Dim OwnerID8625 as String
OwnerID8625 = DataExtRetOwnerID.GetValue()
End If
'Get value of DataExtName
Dim DataExtName8626 as String
DataExtName8626 = DataExtRetDataExtName.GetValue()
'Get value of DataExtType
Dim DataExtType8627 as ENDataExtType
DataExtType8627 = DataExtRetDataExtType.GetValue()
'Get value of DataExtValue
Dim DataExtValue8628 as String
DataExtValue8628 = DataExtRetDataExtValue.GetValue()
Next i8624
End If
End Sub
End Class
End Module
|
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 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 | //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.QBFC16; namespace com.intuit.idn.samples { public class Sample { public void DoEmployeeMod() { bool sessionBegun = false; bool connectionOpen = false; QBSessionManager sessionManager = null; try { //Create the session Manager object sessionManager = new QBSessionManager(); //Create the message set request object to hold our request IMsgSetRequest requestMsgSet = sessionManager.CreateMsgSetRequest("US",16,0); requestMsgSet.Attributes.OnError = ENRqOnError.roeContinue; BuildEmployeeModRq(requestMsgSet); //Connect to QuickBooks and begin a session sessionManager.OpenConnection("","Sample Code from OSR"); connectionOpen = true; sessionManager.BeginSession("", ENOpenMode.omDontCare); 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; WalkEmployeeModRs(responseMsgSet); } catch (Exception e) { MessageBox.Show(e.Message, "Error"); if (sessionBegun) { sessionManager.EndSession(); } if (connectionOpen) { sessionManager.CloseConnection(); } } } void BuildEmployeeModRq(IMsgSetRequest requestMsgSet) { IEmployeeMod EmployeeModRq= requestMsgSet.AppendEmployeeModRq(); //Set field value for ListID EmployeeModRq.ListID.SetValue("200000-1011023419"); //Set field value for EditSequence EmployeeModRq.EditSequence.SetValue("ab"); //Set field value for IsActive EmployeeModRq.IsActive.SetValue(true); //Set field value for Salutation EmployeeModRq.Salutation.SetValue("ab"); //Set field value for FirstName EmployeeModRq.FirstName.SetValue("ab"); //Set field value for MiddleName EmployeeModRq.MiddleName.SetValue("ab"); //Set field value for LastName EmployeeModRq.LastName.SetValue("ab"); //Set field value for JobTitle EmployeeModRq.JobTitle.SetValue("ab"); //Set field value for ListID EmployeeModRq.SupervisorRef.ListID.SetValue("200000-1011023419"); //Set field value for FullName EmployeeModRq.SupervisorRef.FullName.SetValue("ab"); //Set field value for Department EmployeeModRq.Department.SetValue("ab"); //Set field value for Description EmployeeModRq.Description.SetValue("ab"); //Set field value for TargetBonus EmployeeModRq.TargetBonus.SetValue(10.01); //Set field value for Addr1 EmployeeModRq.EmployeeAddress.Addr1.SetValue("ab"); //Set field value for Addr2 EmployeeModRq.EmployeeAddress.Addr2.SetValue("ab"); //Set field value for City EmployeeModRq.EmployeeAddress.City.SetValue("ab"); //Set field value for State EmployeeModRq.EmployeeAddress.State.SetValue("ab"); //Set field value for PostalCode EmployeeModRq.EmployeeAddress.PostalCode.SetValue("ab"); //Set field value for PrintAs EmployeeModRq.PrintAs.SetValue("ab"); //Set field value for Phone EmployeeModRq.Phone.SetValue("ab"); //Set field value for Mobile EmployeeModRq.Mobile.SetValue("ab"); //Set field value for Pager EmployeeModRq.Pager.SetValue("ab"); //Set field value for PagerPIN EmployeeModRq.PagerPIN.SetValue("ab"); //Set field value for AltPhone EmployeeModRq.AltPhone.SetValue("ab"); //Set field value for Fax EmployeeModRq.Fax.SetValue("ab"); //Set field value for Email EmployeeModRq.Email.SetValue("ab"); IQBBaseRef AdditionalContactRef8423=EmployeeModRq.AdditionalContactRefList.Append(); //Set field value for ContactName AdditionalContactRef8423.ContactName.SetValue("ab"); //Set field value for ContactValue AdditionalContactRef8423.ContactValue.SetValue("ab"); //Set field value for ContactName EmployeeModRq.EmergencyContacts.PrimaryContact.ContactName.SetValue("ab"); //Set field value for ContactValue EmployeeModRq.EmergencyContacts.PrimaryContact.ContactValue.SetValue("ab"); //Set field value for Relation EmployeeModRq.EmergencyContacts.PrimaryContact.Relation.SetValue(ENRelation.rSpouse); //Set field value for ContactName EmployeeModRq.EmergencyContacts.SecondaryContact.ContactName.SetValue("ab"); //Set field value for ContactValue EmployeeModRq.EmergencyContacts.SecondaryContact.ContactValue.SetValue("ab"); //Set field value for Relation EmployeeModRq.EmergencyContacts.SecondaryContact.Relation.SetValue(ENRelation.rSpouse); //Set field value for EmployeeType EmployeeModRq.EmployeeType.SetValue(ENEmployeeType.etOfficer); //Set field value for PartOrFullTime EmployeeModRq.PartOrFullTime.SetValue(ENPartOrFullTime.poftPartTime); //Set field value for Exempt EmployeeModRq.Exempt.SetValue(ENExempt.eExempt); //Set field value for KeyEmployee EmployeeModRq.KeyEmployee.SetValue(ENKeyEmployee.keYes); //Set field value for HiredDate EmployeeModRq.HiredDate.SetValue(DateTime.Parse("12/15/2007")); //Set field value for OriginalHireDate EmployeeModRq.OriginalHireDate.SetValue(DateTime.Parse("12/15/2007")); //Set field value for AdjustedServiceDate EmployeeModRq.AdjustedServiceDate.SetValue(DateTime.Parse("12/15/2007")); //Set field value for ReleasedDate EmployeeModRq.ReleasedDate.SetValue(DateTime.Parse("12/15/2007")); //Set field value for BirthDate EmployeeModRq.BirthDate.SetValue(DateTime.Parse("12/15/2007")); //Set field value for USCitizen EmployeeModRq.USCitizen.SetValue(ENUSCitizen.uscYes); //Set field value for Ethnicity EmployeeModRq.Ethnicity.SetValue(ENEthnicity.eAmericianIndian); //Set field value for Disabled EmployeeModRq.Disabled.SetValue(ENDisabled.dYes); //Set field value for DisabilityDesc EmployeeModRq.DisabilityDesc.SetValue("ab"); //Set field value for OnFile EmployeeModRq.OnFile.SetValue(ENOnFile.ofYes); //Set field value for WorkAuthExpireDate EmployeeModRq.WorkAuthExpireDate.SetValue(DateTime.Parse("12/15/2007")); //Set field value for USVeteran EmployeeModRq.USVeteran.SetValue(ENUSVeteran.usvYes); //Set field value for MilitaryStatus EmployeeModRq.MilitaryStatus.SetValue(ENMilitaryStatus.msActive); //Set field value for AccountNumber EmployeeModRq.AccountNumber.SetValue("ab"); //Set field value for Notes EmployeeModRq.Notes.SetValue("ab"); IAdditionalNotesMod AdditionalNotesMod8424=EmployeeModRq.AdditionalNotesModList.Append(); //Set field value for NoteID AdditionalNotesMod8424.NoteID.SetValue(6); //Set field value for Note AdditionalNotesMod8424.Note.SetValue("ab"); //Set field value for ListID EmployeeModRq.BillingRateRef.ListID.SetValue("200000-1011023419"); //Set field value for FullName EmployeeModRq.BillingRateRef.FullName.SetValue("ab"); //Set field value for PayPeriod EmployeeModRq.EmployeePayrollInfoMod.PayPeriod.SetValue(ENPayPeriod.ppDaily); //Set field value for ListID EmployeeModRq.EmployeePayrollInfoMod.ClassRef.ListID.SetValue("200000-1011023419"); //Set field value for FullName EmployeeModRq.EmployeePayrollInfoMod.ClassRef.FullName.SetValue("ab"); string OREarningsElementType8425 = "ClearEarnings"; if (OREarningsElementType8425 == "ClearEarnings") { //Set field value for ClearEarnings EmployeeModRq.EmployeePayrollInfoMod.OREarnings.ClearEarnings.SetValue(true); } if (OREarningsElementType8425 == "EarningsList") { IEarnings Earnings8426=EmployeeModRq.EmployeePayrollInfoMod.OREarnings.EarningsList.Append(); //Set field value for ListID Earnings8426.PayrollItemWageRef.ListID.SetValue("200000-1011023419"); //Set field value for FullName Earnings8426.PayrollItemWageRef.FullName.SetValue("ab"); string ORRateElementType8427 = "Rate"; if (ORRateElementType8427 == "Rate") { //Set field value for Rate Earnings8426.ORRate.Rate.SetValue(15.65); } if (ORRateElementType8427 == "RatePercent") { //Set field value for RatePercent Earnings8426.ORRate.RatePercent.SetValue(20.00); } } //Set field value for IsUsingTimeDataToCreatePaychecks EmployeeModRq.EmployeePayrollInfoMod.IsUsingTimeDataToCreatePaychecks.SetValue(true); //Set field value for UseTimeDataToCreatePaychecks EmployeeModRq.EmployeePayrollInfoMod.UseTimeDataToCreatePaychecks.SetValue(ENUseTimeDataToCreatePaychecks.utdtcpNotSet); //Set field value for HoursAvailable EmployeeModRq.EmployeePayrollInfoMod.SickHours.HoursAvailable.SetValue("IQBTimeIntervalType"); //Set field value for AccrualPeriod EmployeeModRq.EmployeePayrollInfoMod.SickHours.AccrualPeriod.SetValue(ENAccrualPeriod.apBeginningOfYear); //Set field value for HoursAccrued EmployeeModRq.EmployeePayrollInfoMod.SickHours.HoursAccrued.SetValue("IQBTimeIntervalType"); //Set field value for MaximumHours EmployeeModRq.EmployeePayrollInfoMod.SickHours.MaximumHours.SetValue("IQBTimeIntervalType"); //Set field value for IsResettingHoursEachNewYear EmployeeModRq.EmployeePayrollInfoMod.SickHours.IsResettingHoursEachNewYear.SetValue(true); //Set field value for HoursUsed EmployeeModRq.EmployeePayrollInfoMod.SickHours.HoursUsed.SetValue("IQBTimeIntervalType"); //Set field value for AccrualStartDate EmployeeModRq.EmployeePayrollInfoMod.SickHours.AccrualStartDate.SetValue(DateTime.Parse("12/15/2007")); //Set field value for HoursAvailable EmployeeModRq.EmployeePayrollInfoMod.VacationHours.HoursAvailable.SetValue("IQBTimeIntervalType"); //Set field value for AccrualPeriod EmployeeModRq.EmployeePayrollInfoMod.VacationHours.AccrualPeriod.SetValue(ENAccrualPeriod.apBeginningOfYear); //Set field value for HoursAccrued EmployeeModRq.EmployeePayrollInfoMod.VacationHours.HoursAccrued.SetValue("IQBTimeIntervalType"); //Set field value for MaximumHours EmployeeModRq.EmployeePayrollInfoMod.VacationHours.MaximumHours.SetValue("IQBTimeIntervalType"); //Set field value for IsResettingHoursEachNewYear EmployeeModRq.EmployeePayrollInfoMod.VacationHours.IsResettingHoursEachNewYear.SetValue(true); //Set field value for HoursUsed EmployeeModRq.EmployeePayrollInfoMod.VacationHours.HoursUsed.SetValue("IQBTimeIntervalType"); //Set field value for AccrualStartDate EmployeeModRq.EmployeePayrollInfoMod.VacationHours.AccrualStartDate.SetValue(DateTime.Parse("12/15/2007")); //Set field value for IncludeRetElementList //May create more than one of these if needed EmployeeModRq.IncludeRetElementList.Add("ab"); } void WalkEmployeeModRs(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.rtEmployeeModRs) { //upcast to more specific type here, this is safe because we checked with response.Type check above IEmployeeRet EmployeeRet = (IEmployeeRet)response.Detail; WalkEmployeeRet(EmployeeRet); } } } } } void WalkEmployeeRet(IEmployeeRet EmployeeRet) { if (EmployeeRet == null) return; //Go through all the elements of IEmployeeRet //Get value of ListID string ListID8428 = (string)EmployeeRet.ListID.GetValue(); //Get value of TimeCreated DateTime TimeCreated8429 = (DateTime)EmployeeRet.TimeCreated.GetValue(); //Get value of TimeModified DateTime TimeModified8430 = (DateTime)EmployeeRet.TimeModified.GetValue(); //Get value of EditSequence string EditSequence8431 = (string)EmployeeRet.EditSequence.GetValue(); //Get value of Name string Name8432 = (string)EmployeeRet.Name.GetValue(); //Get value of IsActive if (EmployeeRet.IsActive != null) { bool IsActive8433 = (bool)EmployeeRet.IsActive.GetValue(); } //Get value of Salutation if (EmployeeRet.Salutation != null) { string Salutation8434 = (string)EmployeeRet.Salutation.GetValue(); } //Get value of FirstName if (EmployeeRet.FirstName != null) { string FirstName8435 = (string)EmployeeRet.FirstName.GetValue(); } //Get value of MiddleName if (EmployeeRet.MiddleName != null) { string MiddleName8436 = (string)EmployeeRet.MiddleName.GetValue(); } //Get value of LastName if (EmployeeRet.LastName != null) { string LastName8437 = (string)EmployeeRet.LastName.GetValue(); } //Get value of JobTitle if (EmployeeRet.JobTitle != null) { string JobTitle8438 = (string)EmployeeRet.JobTitle.GetValue(); } if (EmployeeRet.SupervisorRef != null) { //Get value of ListID if (EmployeeRet.SupervisorRef.ListID != null) { string ListID8439 = (string)EmployeeRet.SupervisorRef.ListID.GetValue(); } //Get value of FullName if (EmployeeRet.SupervisorRef.FullName != null) { string FullName8440 = (string)EmployeeRet.SupervisorRef.FullName.GetValue(); } } //Get value of Department if (EmployeeRet.Department != null) { string Department8441 = (string)EmployeeRet.Department.GetValue(); } //Get value of Description if (EmployeeRet.Description != null) { string Description8442 = (string)EmployeeRet.Description.GetValue(); } //Get value of TargetBonus if (EmployeeRet.TargetBonus != null) { double TargetBonus8443 = (double)EmployeeRet.TargetBonus.GetValue(); } if (EmployeeRet.EmployeeAddress != null) { //Get value of Addr1 if (EmployeeRet.EmployeeAddress.Addr1 != null) { string Addr18444 = (string)EmployeeRet.EmployeeAddress.Addr1.GetValue(); } //Get value of Addr2 if (EmployeeRet.EmployeeAddress.Addr2 != null) { string Addr28445 = (string)EmployeeRet.EmployeeAddress.Addr2.GetValue(); } //Get value of City if (EmployeeRet.EmployeeAddress.City != null) { string City8446 = (string)EmployeeRet.EmployeeAddress.City.GetValue(); } //Get value of State if (EmployeeRet.EmployeeAddress.State != null) { string State8447 = (string)EmployeeRet.EmployeeAddress.State.GetValue(); } //Get value of PostalCode if (EmployeeRet.EmployeeAddress.PostalCode != null) { string PostalCode8448 = (string)EmployeeRet.EmployeeAddress.PostalCode.GetValue(); } } //Get value of PrintAs if (EmployeeRet.PrintAs != null) { string PrintAs8449 = (string)EmployeeRet.PrintAs.GetValue(); } //Get value of Phone if (EmployeeRet.Phone != null) { string Phone8450 = (string)EmployeeRet.Phone.GetValue(); } //Get value of Mobile if (EmployeeRet.Mobile != null) { string Mobile8451 = (string)EmployeeRet.Mobile.GetValue(); } //Get value of Pager if (EmployeeRet.Pager != null) { string Pager8452 = (string)EmployeeRet.Pager.GetValue(); } //Get value of PagerPIN if (EmployeeRet.PagerPIN != null) { string PagerPIN8453 = (string)EmployeeRet.PagerPIN.GetValue(); } //Get value of AltPhone if (EmployeeRet.AltPhone != null) { string AltPhone8454 = (string)EmployeeRet.AltPhone.GetValue(); } //Get value of Fax if (EmployeeRet.Fax != null) { string Fax8455 = (string)EmployeeRet.Fax.GetValue(); } //Get value of SSN if (EmployeeRet.SSN != null) { string SSN8456 = (string)EmployeeRet.SSN.GetValue(); } //Get value of Email if (EmployeeRet.Email != null) { string Email8457 = (string)EmployeeRet.Email.GetValue(); } if (EmployeeRet.AdditionalContactRefList != null) { for (int i8458 = 0; i8458 < EmployeeRet.AdditionalContactRefList.Count; i8458++) { IQBBaseRef QBBaseRef = EmployeeRet.AdditionalContactRefList.GetAt(i8458); //Get value of ContactName string ContactName8459 = (string)QBBaseRef.ContactName.GetValue(); //Get value of ContactValue string ContactValue8460 = (string)QBBaseRef.ContactValue.GetValue(); } } if (EmployeeRet.EmergencyContacts != null) { if (EmployeeRet.EmergencyContacts.PrimaryContact != null) { //Get value of ContactName string ContactName8461 = (string)EmployeeRet.EmergencyContacts.PrimaryContact.ContactName.GetValue(); //Get value of ContactValue string ContactValue8462 = (string)EmployeeRet.EmergencyContacts.PrimaryContact.ContactValue.GetValue(); //Get value of Relation if (EmployeeRet.EmergencyContacts.PrimaryContact.Relation != null) { ENRelation Relation8463 = (ENRelation)EmployeeRet.EmergencyContacts.PrimaryContact.Relation.GetValue(); } } if (EmployeeRet.EmergencyContacts.SecondaryContact != null) { //Get value of ContactName string ContactName8464 = (string)EmployeeRet.EmergencyContacts.SecondaryContact.ContactName.GetValue(); //Get value of ContactValue string ContactValue8465 = (string)EmployeeRet.EmergencyContacts.SecondaryContact.ContactValue.GetValue(); //Get value of Relation if (EmployeeRet.EmergencyContacts.SecondaryContact.Relation != null) { ENRelation Relation8466 = (ENRelation)EmployeeRet.EmergencyContacts.SecondaryContact.Relation.GetValue(); } } } //Get value of EmployeeType if (EmployeeRet.EmployeeType != null) { ENEmployeeType EmployeeType8467 = (ENEmployeeType)EmployeeRet.EmployeeType.GetValue(); } //Get value of PartOrFullTime if (EmployeeRet.PartOrFullTime != null) { ENPartOrFullTime PartOrFullTime8468 = (ENPartOrFullTime)EmployeeRet.PartOrFullTime.GetValue(); } //Get value of Exempt if (EmployeeRet.Exempt != null) { ENExempt Exempt8469 = (ENExempt)EmployeeRet.Exempt.GetValue(); } //Get value of KeyEmployee if (EmployeeRet.KeyEmployee != null) { ENKeyEmployee KeyEmployee8470 = (ENKeyEmployee)EmployeeRet.KeyEmployee.GetValue(); } //Get value of Gender if (EmployeeRet.Gender != null) { ENGender Gender8471 = (ENGender)EmployeeRet.Gender.GetValue(); } //Get value of HiredDate if (EmployeeRet.HiredDate != null) { DateTime HiredDate8472 = (DateTime)EmployeeRet.HiredDate.GetValue(); } //Get value of OriginalHireDate if (EmployeeRet.OriginalHireDate != null) { DateTime OriginalHireDate8473 = (DateTime)EmployeeRet.OriginalHireDate.GetValue(); } //Get value of AdjustedServiceDate if (EmployeeRet.AdjustedServiceDate != null) { DateTime AdjustedServiceDate8474 = (DateTime)EmployeeRet.AdjustedServiceDate.GetValue(); } //Get value of ReleasedDate if (EmployeeRet.ReleasedDate != null) { DateTime ReleasedDate8475 = (DateTime)EmployeeRet.ReleasedDate.GetValue(); } //Get value of BirthDate if (EmployeeRet.BirthDate != null) { DateTime BirthDate8476 = (DateTime)EmployeeRet.BirthDate.GetValue(); } //Get value of USCitizen if (EmployeeRet.USCitizen != null) { ENUSCitizen USCitizen8477 = (ENUSCitizen)EmployeeRet.USCitizen.GetValue(); } //Get value of Ethnicity if (EmployeeRet.Ethnicity != null) { ENEthnicity Ethnicity8478 = (ENEthnicity)EmployeeRet.Ethnicity.GetValue(); } //Get value of Disabled if (EmployeeRet.Disabled != null) { ENDisabled Disabled8479 = (ENDisabled)EmployeeRet.Disabled.GetValue(); } //Get value of DisabilityDesc if (EmployeeRet.DisabilityDesc != null) { string DisabilityDesc8480 = (string)EmployeeRet.DisabilityDesc.GetValue(); } //Get value of OnFile if (EmployeeRet.OnFile != null) { ENOnFile OnFile8481 = (ENOnFile)EmployeeRet.OnFile.GetValue(); } //Get value of WorkAuthExpireDate if (EmployeeRet.WorkAuthExpireDate != null) { DateTime WorkAuthExpireDate8482 = (DateTime)EmployeeRet.WorkAuthExpireDate.GetValue(); } //Get value of USVeteran if (EmployeeRet.USVeteran != null) { ENUSVeteran USVeteran8483 = (ENUSVeteran)EmployeeRet.USVeteran.GetValue(); } //Get value of MilitaryStatus if (EmployeeRet.MilitaryStatus != null) { ENMilitaryStatus MilitaryStatus8484 = (ENMilitaryStatus)EmployeeRet.MilitaryStatus.GetValue(); } //Get value of AccountNumber if (EmployeeRet.AccountNumber != null) { string AccountNumber8485 = (string)EmployeeRet.AccountNumber.GetValue(); } //Get value of Notes if (EmployeeRet.Notes != null) { string Notes8486 = (string)EmployeeRet.Notes.GetValue(); } if (EmployeeRet.AdditionalNotesRetList != null) { for (int i8487 = 0; i8487 < EmployeeRet.AdditionalNotesRetList.Count; i8487++) { IAdditionalNotesRet AdditionalNotesRet = EmployeeRet.AdditionalNotesRetList.GetAt(i8487); //Get value of NoteID int NoteID8488 = (int)AdditionalNotesRet.NoteID.GetValue(); //Get value of Date DateTime Date8489 = (DateTime)AdditionalNotesRet.Date.GetValue(); //Get value of Note string Note8490 = (string)AdditionalNotesRet.Note.GetValue(); } } if (EmployeeRet.BillingRateRef != null) { //Get value of ListID if (EmployeeRet.BillingRateRef.ListID != null) { string ListID8491 = (string)EmployeeRet.BillingRateRef.ListID.GetValue(); } //Get value of FullName if (EmployeeRet.BillingRateRef.FullName != null) { string FullName8492 = (string)EmployeeRet.BillingRateRef.FullName.GetValue(); } } if (EmployeeRet.EmployeePayrollInfo != null) { //Get value of PayPeriod if (EmployeeRet.EmployeePayrollInfo.PayPeriod != null) { ENPayPeriod PayPeriod8493 = (ENPayPeriod)EmployeeRet.EmployeePayrollInfo.PayPeriod.GetValue(); } if (EmployeeRet.EmployeePayrollInfo.ClassRef != null) { //Get value of ListID if (EmployeeRet.EmployeePayrollInfo.ClassRef.ListID != null) { string ListID8494 = (string)EmployeeRet.EmployeePayrollInfo.ClassRef.ListID.GetValue(); } //Get value of FullName if (EmployeeRet.EmployeePayrollInfo.ClassRef.FullName != null) { string FullName8495 = (string)EmployeeRet.EmployeePayrollInfo.ClassRef.FullName.GetValue(); } } if (EmployeeRet.EmployeePayrollInfo.OREarnings != null) { if (EmployeeRet.EmployeePayrollInfo.OREarnings.ClearEarnings != null) { //Get value of ClearEarnings if (EmployeeRet.EmployeePayrollInfo.OREarnings.ClearEarnings != null) { bool ClearEarnings8497 = (bool)EmployeeRet.EmployeePayrollInfo.OREarnings.ClearEarnings.GetValue(); } } if (EmployeeRet.EmployeePayrollInfo.OREarnings.EarningsList != null) { if (EmployeeRet.EmployeePayrollInfo.OREarnings.EarningsList != null) { for (int i8498 = 0; i8498 < EmployeeRet.EmployeePayrollInfo.OREarnings.EarningsList.Count; i8498++) { IEarnings Earnings = EmployeeRet.EmployeePayrollInfo.OREarnings.EarningsList.GetAt(i8498); //Get value of ListID if (Earnings.PayrollItemWageRef.ListID != null) { string ListID8499 = (string)Earnings.PayrollItemWageRef.ListID.GetValue(); } //Get value of FullName if (Earnings.PayrollItemWageRef.FullName != null) { string FullName8500 = (string)Earnings.PayrollItemWageRef.FullName.GetValue(); } if (Earnings.ORRate != null) { if (Earnings.ORRate.Rate != null) { //Get value of Rate if (Earnings.ORRate.Rate != null) { double Rate8502 = (double)Earnings.ORRate.Rate.GetValue(); } } if (Earnings.ORRate.RatePercent != null) { //Get value of RatePercent if (Earnings.ORRate.RatePercent != null) { double RatePercent8503 = (double)Earnings.ORRate.RatePercent.GetValue(); } } } } } } } //Get value of IsUsingTimeDataToCreatePaychecks if (EmployeeRet.EmployeePayrollInfo.IsUsingTimeDataToCreatePaychecks != null) { bool IsUsingTimeDataToCreatePaychecks8504 = (bool)EmployeeRet.EmployeePayrollInfo.IsUsingTimeDataToCreatePaychecks.GetValue(); } //Get value of UseTimeDataToCreatePaychecks if (EmployeeRet.EmployeePayrollInfo.UseTimeDataToCreatePaychecks != null) { ENUseTimeDataToCreatePaychecks UseTimeDataToCreatePaychecks8505 = (ENUseTimeDataToCreatePaychecks)EmployeeRet.EmployeePayrollInfo.UseTimeDataToCreatePaychecks.GetValue(); } if (EmployeeRet.EmployeePayrollInfo.SickHours != null) { //Get value of HoursAvailable if (EmployeeRet.EmployeePayrollInfo.SickHours.HoursAvailable != null) { IQBTimeIntervalType HoursAvailable8506 = (IQBTimeIntervalType)EmployeeRet.EmployeePayrollInfo.SickHours.HoursAvailable.GetValue(); } //Get value of AccrualPeriod if (EmployeeRet.EmployeePayrollInfo.SickHours.AccrualPeriod != null) { ENAccrualPeriod AccrualPeriod8507 = (ENAccrualPeriod)EmployeeRet.EmployeePayrollInfo.SickHours.AccrualPeriod.GetValue(); } //Get value of HoursAccrued if (EmployeeRet.EmployeePayrollInfo.SickHours.HoursAccrued != null) { IQBTimeIntervalType HoursAccrued8508 = (IQBTimeIntervalType)EmployeeRet.EmployeePayrollInfo.SickHours.HoursAccrued.GetValue(); } //Get value of MaximumHours if (EmployeeRet.EmployeePayrollInfo.SickHours.MaximumHours != null) { IQBTimeIntervalType MaximumHours8509 = (IQBTimeIntervalType)EmployeeRet.EmployeePayrollInfo.SickHours.MaximumHours.GetValue(); } //Get value of IsResettingHoursEachNewYear if (EmployeeRet.EmployeePayrollInfo.SickHours.IsResettingHoursEachNewYear != null) { bool IsResettingHoursEachNewYear8510 = (bool)EmployeeRet.EmployeePayrollInfo.SickHours.IsResettingHoursEachNewYear.GetValue(); } //Get value of HoursUsed if (EmployeeRet.EmployeePayrollInfo.SickHours.HoursUsed != null) { IQBTimeIntervalType HoursUsed8511 = (IQBTimeIntervalType)EmployeeRet.EmployeePayrollInfo.SickHours.HoursUsed.GetValue(); } //Get value of AccrualStartDate if (EmployeeRet.EmployeePayrollInfo.SickHours.AccrualStartDate != null) { DateTime AccrualStartDate8512 = (DateTime)EmployeeRet.EmployeePayrollInfo.SickHours.AccrualStartDate.GetValue(); } } if (EmployeeRet.EmployeePayrollInfo.VacationHours != null) { //Get value of HoursAvailable if (EmployeeRet.EmployeePayrollInfo.VacationHours.HoursAvailable != null) { IQBTimeIntervalType HoursAvailable8513 = (IQBTimeIntervalType)EmployeeRet.EmployeePayrollInfo.VacationHours.HoursAvailable.GetValue(); } //Get value of AccrualPeriod if (EmployeeRet.EmployeePayrollInfo.VacationHours.AccrualPeriod != null) { ENAccrualPeriod AccrualPeriod8514 = (ENAccrualPeriod)EmployeeRet.EmployeePayrollInfo.VacationHours.AccrualPeriod.GetValue(); } //Get value of HoursAccrued if (EmployeeRet.EmployeePayrollInfo.VacationHours.HoursAccrued != null) { IQBTimeIntervalType HoursAccrued8515 = (IQBTimeIntervalType)EmployeeRet.EmployeePayrollInfo.VacationHours.HoursAccrued.GetValue(); } //Get value of MaximumHours if (EmployeeRet.EmployeePayrollInfo.VacationHours.MaximumHours != null) { IQBTimeIntervalType MaximumHours8516 = (IQBTimeIntervalType)EmployeeRet.EmployeePayrollInfo.VacationHours.MaximumHours.GetValue(); } //Get value of IsResettingHoursEachNewYear if (EmployeeRet.EmployeePayrollInfo.VacationHours.IsResettingHoursEachNewYear != null) { bool IsResettingHoursEachNewYear8517 = (bool)EmployeeRet.EmployeePayrollInfo.VacationHours.IsResettingHoursEachNewYear.GetValue(); } //Get value of HoursUsed if (EmployeeRet.EmployeePayrollInfo.VacationHours.HoursUsed != null) { IQBTimeIntervalType HoursUsed8518 = (IQBTimeIntervalType)EmployeeRet.EmployeePayrollInfo.VacationHours.HoursUsed.GetValue(); } //Get value of AccrualStartDate if (EmployeeRet.EmployeePayrollInfo.VacationHours.AccrualStartDate != null) { DateTime AccrualStartDate8519 = (DateTime)EmployeeRet.EmployeePayrollInfo.VacationHours.AccrualStartDate.GetValue(); } } } //Get value of ExternalGUID if (EmployeeRet.ExternalGUID != null) { string ExternalGUID8520 = (string)EmployeeRet.ExternalGUID.GetValue(); } if (EmployeeRet.DataExtRetList != null) { for (int i8521 = 0; i8521 < EmployeeRet.DataExtRetList.Count; i8521++) { IDataExtRet DataExtRet = EmployeeRet.DataExtRetList.GetAt(i8521); //Get value of OwnerID if (DataExtRet.OwnerID != null) { string OwnerID8522 = (string)DataExtRet.OwnerID.GetValue(); } //Get value of DataExtName string DataExtName8523 = (string)DataExtRet.DataExtName.GetValue(); //Get value of DataExtType ENDataExtType DataExtType8524 = (ENDataExtType)DataExtRet.DataExtType.GetValue(); //Get value of DataExtValue string DataExtValue8525 = (string)DataExtRet.DataExtValue.GetValue(); } } } } } |