如何使用 QuickBooks SDK 13.0 通过我的 windows 应用程序(C# 或 VB.Net)删除 Quickbook 员工

How to delete Quickbook Employee through my windows application (C# or VB.Net) using QuickBooks SDK 13.0

请帮忙:

我使用 windows 应用程序 (C#) 在 QuickBooksQuickBooks SDK 中实现了 add and edit 功能。

现在,我想知道如何使用 QuickBooks SDKQuickBooks 中执行 delete operation

这是我的XML请求:

<?xml version="1.0"?>
    <?qbxml version="13.0"?>
    <QBXML>
        <QBXMLMsgsRq onError="stopOnError">
            <EmployeeModRq requestID="1">  
                <EmployeeMod>  
                    <ListID>800002A0-1477976825</ListID>
                    <EditSequence>1477977063</EditSequence>
                    <IsActive>False</IsActive>
                    <FirstName>Bobby</FirstName>
                    <MiddleName></MiddleName>
                    <LastName>Westbrooks(111-11-1111)</LastName>
                    <EmployeeAddress>
                        <Addr1>4205 Coleman</Addr1>
                        <City>Memphis</City>
                        <PostalCode>38128</PostalCode>
                    </EmployeeAddress>
                    <SSN>111-11-1111</SSN>
                    <Email>bgwestbrooks@brmch.com</Email>
                    <EmergencyContacts>
                    <PrimaryContact>
                        <ContactName>Rhonda Westbrooks</ContactName>
                        <ContactValue>0</ContactValue>
                    </PrimaryContact>
                    </EmergencyContacts>
                    <HiredDate>2015-11-11</HiredDate>
                    <ReleasedDate>2015-11-11</ReleasedDate>
                    <BirthDate>2015-11-11</BirthDate>
                </EmployeeMod>
            </EmployeeModRq>
        </QBXMLMsgsRq>
    </QBXML>
</xml>

您可以使用 ListDel 请求删除员工(以及其他 List 类型的对象,如客户、供应商等)。

来自 OSR:

ListDel - Delete a list object

ou can only delete a list item from a QuickBooks company file if the file is open in single-user mode. If the file is open in multiuser mode, your application will receive an error. (This restriction does not apply to deleting or voiding transaction objects.)

<?xml version="1.0" encoding="utf-8"?>
<?qbxml version="13.0"?>
<QBXML>
  <QBXMLMsgsRq onError="stopOnError">
    <ListDelRq>
      <!-- ListDelType may have one of the following values: Account, BillingRate, Class, Currency, Customer, CustomerMsg, CustomerType, DateDrivenTerms, Employee, InventorySite, ItemDiscount, ItemFixedAsset, ItemGroup, ItemInventory, ItemInventoryAssembly, ItemNonInventory, ItemOtherCharge, ItemPayment, ItemSalesTax, ItemSalesTaxGroup, ItemService, ItemSubtotal, JobType, OtherName, PaymentMethod, PayrollItemNonWage, PayrollItemWage, PriceLevel, SalesRep, SalesTaxCode, ShipMethod, StandardTerms, ToDo, UnitOfMeasureSet, Vehicle, Vendor, VendorType, WorkersCompCode -->
      <ListDelType >ENUMTYPE</ListDelType> <!-- required -->
      <ListID >IDTYPE</ListID> <!-- required -->
    </ListDelRq>
  </QBXMLMsgsRq>
</QBXML>