Skip to content

Instantly share code, notes, and snippets.

@yakov116
Created March 22, 2024 17:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yakov116/9d025fe711da58b1cf50d671439bcd17 to your computer and use it in GitHub Desktop.
Save yakov116/9d025fe711da58b1cf50d671439bcd17 to your computer and use it in GitHub Desktop.
sample
//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 DoCheckAdd()
{
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;
BuildCheckAddRq(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;
WalkCheckAddRs(responseMsgSet);
}
catch (Exception e)
{
MessageBox.Show(e.Message, "Error");
if (sessionBegun)
{
sessionManager.EndSession();
}
if (connectionOpen)
{
sessionManager.CloseConnection();
}
}
}
void BuildCheckAddRq(IMsgSetRequest requestMsgSet)
{
ICheckAdd CheckAddRq= requestMsgSet.AppendCheckAddRq();
//Set attributes
//Set field value for defMacro
CheckAddRq.defMacro.SetValue("IQBStringType");
//Set field value for ListID
CheckAddRq.AccountRef.ListID.SetValue("200000-1011023419");
//Set field value for FullName
CheckAddRq.AccountRef.FullName.SetValue("ab");
//Set field value for ListID
CheckAddRq.PayeeEntityRef.ListID.SetValue("200000-1011023419");
//Set field value for FullName
CheckAddRq.PayeeEntityRef.FullName.SetValue("ab");
//Set field value for RefNumber
CheckAddRq.RefNumber.SetValue("ab");
//Set field value for TxnDate
CheckAddRq.TxnDate.SetValue(DateTime.Parse("12/15/2007"));
//Set field value for Memo
CheckAddRq.Memo.SetValue("ab");
//Set field value for Addr1
CheckAddRq.Address.Addr1.SetValue("ab");
//Set field value for Addr2
CheckAddRq.Address.Addr2.SetValue("ab");
//Set field value for Addr3
CheckAddRq.Address.Addr3.SetValue("ab");
//Set field value for Addr4
CheckAddRq.Address.Addr4.SetValue("ab");
//Set field value for Addr5
CheckAddRq.Address.Addr5.SetValue("ab");
//Set field value for City
CheckAddRq.Address.City.SetValue("ab");
//Set field value for State
CheckAddRq.Address.State.SetValue("ab");
//Set field value for PostalCode
CheckAddRq.Address.PostalCode.SetValue("ab");
//Set field value for Country
CheckAddRq.Address.Country.SetValue("ab");
//Set field value for Note
CheckAddRq.Address.Note.SetValue("ab");
//Set field value for IsToBePrinted
CheckAddRq.IsToBePrinted.SetValue(true);
//Set field value for IsTaxIncluded
CheckAddRq.IsTaxIncluded.SetValue(true);
//Set field value for ListID
CheckAddRq.SalesTaxCodeRef.ListID.SetValue("200000-1011023419");
//Set field value for FullName
CheckAddRq.SalesTaxCodeRef.FullName.SetValue("ab");
//Set field value for ExchangeRate
CheckAddRq.ExchangeRate.SetValue("IQBFloatType");
//Set field value for ExternalGUID
CheckAddRq.ExternalGUID.SetValue(Guid.NewGuid().ToString());
IApplyCheckToTxnAdd ApplyCheckToTxnAdd2725=CheckAddRq.ApplyCheckToTxnAddList.Append();
//Set field value for TxnID
ApplyCheckToTxnAdd2725.TxnID.SetValue("200000-1011023419");
//Set attributes
//Set field value for useMacro
ApplyCheckToTxnAdd2725.useMacro.SetValue("IQBStringType");
//Set field value for Amount
ApplyCheckToTxnAdd2725.Amount.SetValue(10.01);
IExpenseLineAdd ExpenseLineAdd2726=CheckAddRq.ExpenseLineAddList.Append();
//Set attributes
//Set field value for defMacro
ExpenseLineAdd2726.defMacro.SetValue("IQBStringType");
//Set field value for ListID
ExpenseLineAdd2726.AccountRef.ListID.SetValue("200000-1011023419");
//Set field value for FullName
ExpenseLineAdd2726.AccountRef.FullName.SetValue("ab");
//Set field value for Amount
ExpenseLineAdd2726.Amount.SetValue(10.01);
//Set field value for Memo
ExpenseLineAdd2726.Memo.SetValue("ab");
//Set field value for ListID
ExpenseLineAdd2726.CustomerRef.ListID.SetValue("200000-1011023419");
//Set field value for FullName
ExpenseLineAdd2726.CustomerRef.FullName.SetValue("ab");
//Set field value for ListID
ExpenseLineAdd2726.ClassRef.ListID.SetValue("200000-1011023419");
//Set field value for FullName
ExpenseLineAdd2726.ClassRef.FullName.SetValue("ab");
//Set field value for ListID
ExpenseLineAdd2726.SalesTaxCodeRef.ListID.SetValue("200000-1011023419");
//Set field value for FullName
ExpenseLineAdd2726.SalesTaxCodeRef.FullName.SetValue("ab");
//Set field value for BillableStatus
ExpenseLineAdd2726.BillableStatus.SetValue(ENBillableStatus.bsBillable);
//Set field value for ListID
ExpenseLineAdd2726.SalesRepRef.ListID.SetValue("200000-1011023419");
//Set field value for FullName
ExpenseLineAdd2726.SalesRepRef.FullName.SetValue("ab");
IDataExt DataExt2727=ExpenseLineAdd2726.DataExtList.Append();
//Set field value for OwnerID
DataExt2727.OwnerID.SetValue(Guid.NewGuid().ToString());
//Set field value for DataExtName
DataExt2727.DataExtName.SetValue("ab");
//Set field value for DataExtValue
DataExt2727.DataExtValue.SetValue("ab");
IORItemLineAdd ORItemLineAddListElement2728 =CheckAddRq.ORItemLineAddList.Append();
string ORItemLineAddListElementType2729 = "ItemLineAdd";
if (ORItemLineAddListElementType2729 == "ItemLineAdd")
{
//Set field value for ListID
ORItemLineAddListElement2728.ItemLineAdd.ItemRef.ListID.SetValue("200000-1011023419");
//Set field value for FullName
ORItemLineAddListElement2728.ItemLineAdd.ItemRef.FullName.SetValue("ab");
//Set field value for ListID
ORItemLineAddListElement2728.ItemLineAdd.InventorySiteRef.ListID.SetValue("200000-1011023419");
//Set field value for FullName
ORItemLineAddListElement2728.ItemLineAdd.InventorySiteRef.FullName.SetValue("ab");
//Set field value for ListID
ORItemLineAddListElement2728.ItemLineAdd.InventorySiteLocationRef.ListID.SetValue("200000-1011023419");
//Set field value for FullName
ORItemLineAddListElement2728.ItemLineAdd.InventorySiteLocationRef.FullName.SetValue("ab");
string ORSerialLotNumberElementType2730 = "SerialNumber";
if (ORSerialLotNumberElementType2730 == "SerialNumber")
{
//Set field value for SerialNumber
ORItemLineAddListElement2728.ItemLineAdd.ORSerialLotNumber.SerialNumber.SetValue("ab");
}
if (ORSerialLotNumberElementType2730 == "LotNumber")
{
//Set field value for LotNumber
ORItemLineAddListElement2728.ItemLineAdd.ORSerialLotNumber.LotNumber.SetValue("ab");
}
//Set field value for ExpirationDateForSerialLotNumber
ORItemLineAddListElement2728.ItemLineAdd.ExpirationDateForSerialLotNumber.SetValue("2022-09-29");
//Set field value for Desc
ORItemLineAddListElement2728.ItemLineAdd.Desc.SetValue("ab");
//Set field value for Quantity
ORItemLineAddListElement2728.ItemLineAdd.Quantity.SetValue(2);
//Set field value for UnitOfMeasure
ORItemLineAddListElement2728.ItemLineAdd.UnitOfMeasure.SetValue("ab");
//Set field value for Cost
ORItemLineAddListElement2728.ItemLineAdd.Cost.SetValue(15.65);
//Set field value for Amount
ORItemLineAddListElement2728.ItemLineAdd.Amount.SetValue(10.01);
//Set field value for ListID
ORItemLineAddListElement2728.ItemLineAdd.CustomerRef.ListID.SetValue("200000-1011023419");
//Set field value for FullName
ORItemLineAddListElement2728.ItemLineAdd.CustomerRef.FullName.SetValue("ab");
//Set field value for ListID
ORItemLineAddListElement2728.ItemLineAdd.ClassRef.ListID.SetValue("200000-1011023419");
//Set field value for FullName
ORItemLineAddListElement2728.ItemLineAdd.ClassRef.FullName.SetValue("ab");
//Set field value for ListID
ORItemLineAddListElement2728.ItemLineAdd.SalesTaxCodeRef.ListID.SetValue("200000-1011023419");
//Set field value for FullName
ORItemLineAddListElement2728.ItemLineAdd.SalesTaxCodeRef.FullName.SetValue("ab");
//Set field value for BillableStatus
ORItemLineAddListElement2728.ItemLineAdd.BillableStatus.SetValue(ENBillableStatus.bsBillable);
//Set field value for ListID
ORItemLineAddListElement2728.ItemLineAdd.OverrideItemAccountRef.ListID.SetValue("200000-1011023419");
//Set field value for FullName
ORItemLineAddListElement2728.ItemLineAdd.OverrideItemAccountRef.FullName.SetValue("ab");
//Set field value for ListID
ORItemLineAddListElement2728.ItemLineAdd.SalesRepRef.ListID.SetValue("200000-1011023419");
//Set field value for FullName
ORItemLineAddListElement2728.ItemLineAdd.SalesRepRef.FullName.SetValue("ab");
IDataExt DataExt2731=ORItemLineAddListElement2728.ItemLineAdd.DataExtList.Append();
//Set field value for OwnerID
DataExt2731.OwnerID.SetValue(Guid.NewGuid().ToString());
//Set field value for DataExtName
DataExt2731.DataExtName.SetValue("ab");
//Set field value for DataExtValue
DataExt2731.DataExtValue.SetValue("ab");
}
if (ORItemLineAddListElementType2729 == "ItemGroupLineAdd")
{
//Set field value for ListID
ORItemLineAddListElement2728.ItemGroupLineAdd.ItemGroupRef.ListID.SetValue("200000-1011023419");
//Set field value for FullName
ORItemLineAddListElement2728.ItemGroupLineAdd.ItemGroupRef.FullName.SetValue("ab");
//Set field value for Quantity
ORItemLineAddListElement2728.ItemGroupLineAdd.Quantity.SetValue(2);
//Set field value for UnitOfMeasure
ORItemLineAddListElement2728.ItemGroupLineAdd.UnitOfMeasure.SetValue("ab");
//Set field value for ListID
ORItemLineAddListElement2728.ItemGroupLineAdd.InventorySiteRef.ListID.SetValue("200000-1011023419");
//Set field value for FullName
ORItemLineAddListElement2728.ItemGroupLineAdd.InventorySiteRef.FullName.SetValue("ab");
//Set field value for ListID
ORItemLineAddListElement2728.ItemGroupLineAdd.InventorySiteLocationRef.ListID.SetValue("200000-1011023419");
//Set field value for FullName
ORItemLineAddListElement2728.ItemGroupLineAdd.InventorySiteLocationRef.FullName.SetValue("ab");
IDataExt DataExt2732=ORItemLineAddListElement2728.ItemGroupLineAdd.DataExtList.Append();
//Set field value for OwnerID
DataExt2732.OwnerID.SetValue(Guid.NewGuid().ToString());
//Set field value for DataExtName
DataExt2732.DataExtName.SetValue("ab");
//Set field value for DataExtValue
DataExt2732.DataExtValue.SetValue("ab");
}
//Set field value for IncludeRetElementList
//May create more than one of these if needed
CheckAddRq.IncludeRetElementList.Add("ab");
}
void WalkCheckAddRs(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.rtCheckAddRs)
{
//upcast to more specific type here, this is safe because we checked with response.Type check above
ICheckRet CheckRet = (ICheckRet)response.Detail;
WalkCheckRet(CheckRet);
}
}
}
}
}
void WalkCheckRet(ICheckRet CheckRet)
{
if (CheckRet == null) return;
//Go through all the elements of ICheckRet
//Get value of TxnID
string TxnID2733 = (string)CheckRet.TxnID.GetValue();
//Get value of TimeCreated
DateTime TimeCreated2734 = (DateTime)CheckRet.TimeCreated.GetValue();
//Get value of TimeModified
DateTime TimeModified2735 = (DateTime)CheckRet.TimeModified.GetValue();
//Get value of EditSequence
string EditSequence2736 = (string)CheckRet.EditSequence.GetValue();
//Get value of TxnNumber
if (CheckRet.TxnNumber != null)
{
int TxnNumber2737 = (int)CheckRet.TxnNumber.GetValue();
}
//Get value of ListID
if (CheckRet.AccountRef.ListID != null)
{
string ListID2738 = (string)CheckRet.AccountRef.ListID.GetValue();
}
//Get value of FullName
if (CheckRet.AccountRef.FullName != null)
{
string FullName2739 = (string)CheckRet.AccountRef.FullName.GetValue();
}
if (CheckRet.PayeeEntityRef != null)
{
//Get value of ListID
if (CheckRet.PayeeEntityRef.ListID != null)
{
string ListID2740 = (string)CheckRet.PayeeEntityRef.ListID.GetValue();
}
//Get value of FullName
if (CheckRet.PayeeEntityRef.FullName != null)
{
string FullName2741 = (string)CheckRet.PayeeEntityRef.FullName.GetValue();
}
}
//Get value of RefNumber
if (CheckRet.RefNumber != null)
{
string RefNumber2742 = (string)CheckRet.RefNumber.GetValue();
}
//Get value of TxnDate
DateTime TxnDate2743 = (DateTime)CheckRet.TxnDate.GetValue();
//Get value of Amount
double Amount2744 = (double)CheckRet.Amount.GetValue();
if (CheckRet.CurrencyRef != null)
{
//Get value of ListID
if (CheckRet.CurrencyRef.ListID != null)
{
string ListID2745 = (string)CheckRet.CurrencyRef.ListID.GetValue();
}
//Get value of FullName
if (CheckRet.CurrencyRef.FullName != null)
{
string FullName2746 = (string)CheckRet.CurrencyRef.FullName.GetValue();
}
}
//Get value of ExchangeRate
if (CheckRet.ExchangeRate != null)
{
IQBFloatType ExchangeRate2747 = (IQBFloatType)CheckRet.ExchangeRate.GetValue();
}
//Get value of AmountInHomeCurrency
if (CheckRet.AmountInHomeCurrency != null)
{
double AmountInHomeCurrency2748 = (double)CheckRet.AmountInHomeCurrency.GetValue();
}
//Get value of Memo
if (CheckRet.Memo != null)
{
string Memo2749 = (string)CheckRet.Memo.GetValue();
}
if (CheckRet.Address != null)
{
//Get value of Addr1
if (CheckRet.Address.Addr1 != null)
{
string Addr12750 = (string)CheckRet.Address.Addr1.GetValue();
}
//Get value of Addr2
if (CheckRet.Address.Addr2 != null)
{
string Addr22751 = (string)CheckRet.Address.Addr2.GetValue();
}
//Get value of Addr3
if (CheckRet.Address.Addr3 != null)
{
string Addr32752 = (string)CheckRet.Address.Addr3.GetValue();
}
//Get value of Addr4
if (CheckRet.Address.Addr4 != null)
{
string Addr42753 = (string)CheckRet.Address.Addr4.GetValue();
}
//Get value of Addr5
if (CheckRet.Address.Addr5 != null)
{
string Addr52754 = (string)CheckRet.Address.Addr5.GetValue();
}
//Get value of City
if (CheckRet.Address.City != null)
{
string City2755 = (string)CheckRet.Address.City.GetValue();
}
//Get value of State
if (CheckRet.Address.State != null)
{
string State2756 = (string)CheckRet.Address.State.GetValue();
}
//Get value of PostalCode
if (CheckRet.Address.PostalCode != null)
{
string PostalCode2757 = (string)CheckRet.Address.PostalCode.GetValue();
}
//Get value of Country
if (CheckRet.Address.Country != null)
{
string Country2758 = (string)CheckRet.Address.Country.GetValue();
}
//Get value of Note
if (CheckRet.Address.Note != null)
{
string Note2759 = (string)CheckRet.Address.Note.GetValue();
}
}
if (CheckRet.AddressBlock != null)
{
//Get value of Addr1
if (CheckRet.AddressBlock.Addr1 != null)
{
string Addr12760 = (string)CheckRet.AddressBlock.Addr1.GetValue();
}
//Get value of Addr2
if (CheckRet.AddressBlock.Addr2 != null)
{
string Addr22761 = (string)CheckRet.AddressBlock.Addr2.GetValue();
}
//Get value of Addr3
if (CheckRet.AddressBlock.Addr3 != null)
{
string Addr32762 = (string)CheckRet.AddressBlock.Addr3.GetValue();
}
//Get value of Addr4
if (CheckRet.AddressBlock.Addr4 != null)
{
string Addr42763 = (string)CheckRet.AddressBlock.Addr4.GetValue();
}
//Get value of Addr5
if (CheckRet.AddressBlock.Addr5 != null)
{
string Addr52764 = (string)CheckRet.AddressBlock.Addr5.GetValue();
}
}
//Get value of IsPending
if (CheckRet.IsPending != null)
{
bool isPending = (bool)CheckRet.IsPending.GetValue();
}
//Get value of IsToBePrinted
if (CheckRet.IsToBePrinted != null)
{
bool IsToBePrinted2765 = (bool)CheckRet.IsToBePrinted.GetValue();
}
//Get value of IsTaxIncluded
if (CheckRet.IsTaxIncluded != null)
{
bool IsTaxIncluded2766 = (bool)CheckRet.IsTaxIncluded.GetValue();
}
if (CheckRet.SalesTaxCodeRef != null)
{
//Get value of ListID
if (CheckRet.SalesTaxCodeRef.ListID != null)
{
string ListID2767 = (string)CheckRet.SalesTaxCodeRef.ListID.GetValue();
}
//Get value of FullName
if (CheckRet.SalesTaxCodeRef.FullName != null)
{
string FullName2768 = (string)CheckRet.SalesTaxCodeRef.FullName.GetValue();
}
}
//Get value of ExternalGUID
if (CheckRet.ExternalGUID != null)
{
string ExternalGUID2769 = (string)CheckRet.ExternalGUID.GetValue();
}
if (CheckRet.LinkedTxnList != null)
{
for (int i2770 = 0; i2770 < CheckRet.LinkedTxnList.Count; i2770++)
{
ILinkedTxn LinkedTxn = CheckRet.LinkedTxnList.GetAt(i2770);
//Get value of TxnID
string TxnID2771 = (string)LinkedTxn.TxnID.GetValue();
//Get value of TxnType
ENTxnType TxnType2772 = (ENTxnType)LinkedTxn.TxnType.GetValue();
//Get value of TxnDate
DateTime TxnDate2773 = (DateTime)LinkedTxn.TxnDate.GetValue();
//Get value of RefNumber
if (LinkedTxn.RefNumber != null)
{
string RefNumber2774 = (string)LinkedTxn.RefNumber.GetValue();
}
//Get value of LinkType
if (LinkedTxn.LinkType != null)
{
ENLinkType LinkType2775 = (ENLinkType)LinkedTxn.LinkType.GetValue();
}
//Get value of Amount
double Amount2776 = (double)LinkedTxn.Amount.GetValue();
}
}
if (CheckRet.ExpenseLineRetList != null)
{
for (int i2777 = 0; i2777 < CheckRet.ExpenseLineRetList.Count; i2777++)
{
IExpenseLineRet ExpenseLineRet = CheckRet.ExpenseLineRetList.GetAt(i2777);
//Get value of TxnLineID
string TxnLineID2778 = (string)ExpenseLineRet.TxnLineID.GetValue();
if (ExpenseLineRet.AccountRef != null)
{
//Get value of ListID
if (ExpenseLineRet.AccountRef.ListID != null)
{
string ListID2779 = (string)ExpenseLineRet.AccountRef.ListID.GetValue();
}
//Get value of FullName
if (ExpenseLineRet.AccountRef.FullName != null)
{
string FullName2780 = (string)ExpenseLineRet.AccountRef.FullName.GetValue();
}
}
//Get value of Amount
if (ExpenseLineRet.Amount != null)
{
double Amount2781 = (double)ExpenseLineRet.Amount.GetValue();
}
//Get value of Memo
if (ExpenseLineRet.Memo != null)
{
string Memo2782 = (string)ExpenseLineRet.Memo.GetValue();
}
if (ExpenseLineRet.CustomerRef != null)
{
//Get value of ListID
if (ExpenseLineRet.CustomerRef.ListID != null)
{
string ListID2783 = (string)ExpenseLineRet.CustomerRef.ListID.GetValue();
}
//Get value of FullName
if (ExpenseLineRet.CustomerRef.FullName != null)
{
string FullName2784 = (string)ExpenseLineRet.CustomerRef.FullName.GetValue();
}
}
if (ExpenseLineRet.ClassRef != null)
{
//Get value of ListID
if (ExpenseLineRet.ClassRef.ListID != null)
{
string ListID2785 = (string)ExpenseLineRet.ClassRef.ListID.GetValue();
}
//Get value of FullName
if (ExpenseLineRet.ClassRef.FullName != null)
{
string FullName2786 = (string)ExpenseLineRet.ClassRef.FullName.GetValue();
}
}
if (ExpenseLineRet.SalesTaxCodeRef != null)
{
//Get value of ListID
if (ExpenseLineRet.SalesTaxCodeRef.ListID != null)
{
string ListID2787 = (string)ExpenseLineRet.SalesTaxCodeRef.ListID.GetValue();
}
//Get value of FullName
if (ExpenseLineRet.SalesTaxCodeRef.FullName != null)
{
string FullName2788 = (string)ExpenseLineRet.SalesTaxCodeRef.FullName.GetValue();
}
}
//Get value of BillableStatus
if (ExpenseLineRet.BillableStatus != null)
{
ENBillableStatus BillableStatus2789 = (ENBillableStatus)ExpenseLineRet.BillableStatus.GetValue();
}
if (ExpenseLineRet.SalesRepRef != null)
{
//Get value of ListID
if (ExpenseLineRet.SalesRepRef.ListID != null)
{
string ListID2790 = (string)ExpenseLineRet.SalesRepRef.ListID.GetValue();
}
//Get value of FullName
if (ExpenseLineRet.SalesRepRef.FullName != null)
{
string FullName2791 = (string)ExpenseLineRet.SalesRepRef.FullName.GetValue();
}
}
if (ExpenseLineRet.DataExtRetList != null)
{
for (int i2792 = 0; i2792 < ExpenseLineRet.DataExtRetList.Count; i2792++)
{
IDataExtRet DataExtRet = ExpenseLineRet.DataExtRetList.GetAt(i2792);
//Get value of OwnerID
if (DataExtRet.OwnerID != null)
{
string OwnerID2793 = (string)DataExtRet.OwnerID.GetValue();
}
//Get value of DataExtName
string DataExtName2794 = (string)DataExtRet.DataExtName.GetValue();
//Get value of DataExtType
ENDataExtType DataExtType2795 = (ENDataExtType)DataExtRet.DataExtType.GetValue();
//Get value of DataExtValue
string DataExtValue2796 = (string)DataExtRet.DataExtValue.GetValue();
}
}
}
}
if (CheckRet.ORItemLineRetList != null)
{
for (int i2797 = 0; i2797 < CheckRet.ORItemLineRetList.Count; i2797++)
{
IORItemLineRet ORItemLineRet2798 = CheckRet.ORItemLineRetList.GetAt(i2797);
if (ORItemLineRet2798.ItemLineRet != null)
{
if (ORItemLineRet2798.ItemLineRet != null)
{
//Get value of TxnLineID
string TxnLineID2799 = (string)ORItemLineRet2798.ItemLineRet.TxnLineID.GetValue();
if (ORItemLineRet2798.ItemLineRet.ItemRef != null)
{
//Get value of ListID
if (ORItemLineRet2798.ItemLineRet.ItemRef.ListID != null)
{
string ListID2800 = (string)ORItemLineRet2798.ItemLineRet.ItemRef.ListID.GetValue();
}
//Get value of FullName
if (ORItemLineRet2798.ItemLineRet.ItemRef.FullName != null)
{
string FullName2801 = (string)ORItemLineRet2798.ItemLineRet.ItemRef.FullName.GetValue();
}
}
if (ORItemLineRet2798.ItemLineRet.InventorySiteRef != null)
{
//Get value of ListID
if (ORItemLineRet2798.ItemLineRet.InventorySiteRef.ListID != null)
{
string ListID2802 = (string)ORItemLineRet2798.ItemLineRet.InventorySiteRef.ListID.GetValue();
}
//Get value of FullName
if (ORItemLineRet2798.ItemLineRet.InventorySiteRef.FullName != null)
{
string FullName2803 = (string)ORItemLineRet2798.ItemLineRet.InventorySiteRef.FullName.GetValue();
}
}
if (ORItemLineRet2798.ItemLineRet.InventorySiteLocationRef != null)
{
//Get value of ListID
if (ORItemLineRet2798.ItemLineRet.InventorySiteLocationRef.ListID != null)
{
string ListID2804 = (string)ORItemLineRet2798.ItemLineRet.InventorySiteLocationRef.ListID.GetValue();
}
//Get value of FullName
if (ORItemLineRet2798.ItemLineRet.InventorySiteLocationRef.FullName != null)
{
string FullName2805 = (string)ORItemLineRet2798.ItemLineRet.InventorySiteLocationRef.FullName.GetValue();
}
}
if (ORItemLineRet2798.ItemLineRet.ORSerialLotNumber != null)
{
if (ORItemLineRet2798.ItemLineRet.ORSerialLotNumber.SerialNumber != null)
{
//Get value of SerialNumber
if (ORItemLineRet2798.ItemLineRet.ORSerialLotNumber.SerialNumber != null)
{
string SerialNumber2807 = (string)ORItemLineRet2798.ItemLineRet.ORSerialLotNumber.SerialNumber.GetValue();
}
}
if (ORItemLineRet2798.ItemLineRet.ORSerialLotNumber.LotNumber != null)
{
//Get value of LotNumber
if (ORItemLineRet2798.ItemLineRet.ORSerialLotNumber.LotNumber != null)
{
string LotNumber2808 = (string)ORItemLineRet2798.ItemLineRet.ORSerialLotNumber.LotNumber.GetValue();
}
}
}
//Get value of ExpirationDateForSerialLotNumber
if (ORItemLineRet2798.ItemLineRet.ExpirationDateForSerialLotNumber != null)
{
string ExpDate = (string)ORItemLineRet2798.ItemLineRet.ExpirationDateForSerialLotNumber.GetValue();
}
//Get value of Desc
if (ORItemLineRet2798.ItemLineRet.Desc != null)
{
string Desc2809 = (string)ORItemLineRet2798.ItemLineRet.Desc.GetValue();
}
//Get value of Quantity
if (ORItemLineRet2798.ItemLineRet.Quantity != null)
{
int Quantity2810 = (int)ORItemLineRet2798.ItemLineRet.Quantity.GetValue();
}
//Get value of UnitOfMeasure
if (ORItemLineRet2798.ItemLineRet.UnitOfMeasure != null)
{
string UnitOfMeasure2811 = (string)ORItemLineRet2798.ItemLineRet.UnitOfMeasure.GetValue();
}
if (ORItemLineRet2798.ItemLineRet.OverrideUOMSetRef != null)
{
//Get value of ListID
if (ORItemLineRet2798.ItemLineRet.OverrideUOMSetRef.ListID != null)
{
string ListID2812 = (string)ORItemLineRet2798.ItemLineRet.OverrideUOMSetRef.ListID.GetValue();
}
//Get value of FullName
if (ORItemLineRet2798.ItemLineRet.OverrideUOMSetRef.FullName != null)
{
string FullName2813 = (string)ORItemLineRet2798.ItemLineRet.OverrideUOMSetRef.FullName.GetValue();
}
}
//Get value of Cost
if (ORItemLineRet2798.ItemLineRet.Cost != null)
{
double Cost2814 = (double)ORItemLineRet2798.ItemLineRet.Cost.GetValue();
}
//Get value of Amount
if (ORItemLineRet2798.ItemLineRet.Amount != null)
{
double Amount2815 = (double)ORItemLineRet2798.ItemLineRet.Amount.GetValue();
}
if (ORItemLineRet2798.ItemLineRet.CustomerRef != null)
{
//Get value of ListID
if (ORItemLineRet2798.ItemLineRet.CustomerRef.ListID != null)
{
string ListID2816 = (string)ORItemLineRet2798.ItemLineRet.CustomerRef.ListID.GetValue();
}
//Get value of FullName
if (ORItemLineRet2798.ItemLineRet.CustomerRef.FullName != null)
{
string FullName2817 = (string)ORItemLineRet2798.ItemLineRet.CustomerRef.FullName.GetValue();
}
}
if (ORItemLineRet2798.ItemLineRet.ClassRef != null)
{
//Get value of ListID
if (ORItemLineRet2798.ItemLineRet.ClassRef.ListID != null)
{
string ListID2818 = (string)ORItemLineRet2798.ItemLineRet.ClassRef.ListID.GetValue();
}
//Get value of FullName
if (ORItemLineRet2798.ItemLineRet.ClassRef.FullName != null)
{
string FullName2819 = (string)ORItemLineRet2798.ItemLineRet.ClassRef.FullName.GetValue();
}
}
if (ORItemLineRet2798.ItemLineRet.SalesTaxCodeRef != null)
{
//Get value of ListID
if (ORItemLineRet2798.ItemLineRet.SalesTaxCodeRef.ListID != null)
{
string ListID2820 = (string)ORItemLineRet2798.ItemLineRet.SalesTaxCodeRef.ListID.GetValue();
}
//Get value of FullName
if (ORItemLineRet2798.ItemLineRet.SalesTaxCodeRef.FullName != null)
{
string FullName2821 = (string)ORItemLineRet2798.ItemLineRet.SalesTaxCodeRef.FullName.GetValue();
}
}
//Get value of BillableStatus
if (ORItemLineRet2798.ItemLineRet.BillableStatus != null)
{
ENBillableStatus BillableStatus2822 = (ENBillableStatus)ORItemLineRet2798.ItemLineRet.BillableStatus.GetValue();
}
if (ORItemLineRet2798.ItemLineRet.SalesRepRef != null)
{
//Get value of ListID
if (ORItemLineRet2798.ItemLineRet.SalesRepRef.ListID != null)
{
string ListID2823 = (string)ORItemLineRet2798.ItemLineRet.SalesRepRef.ListID.GetValue();
}
//Get value of FullName
if (ORItemLineRet2798.ItemLineRet.SalesRepRef.FullName != null)
{
string FullName2824 = (string)ORItemLineRet2798.ItemLineRet.SalesRepRef.FullName.GetValue();
}
}
if (ORItemLineRet2798.ItemLineRet.DataExtRetList != null)
{
for (int i2825 = 0; i2825 < ORItemLineRet2798.ItemLineRet.DataExtRetList.Count; i2825++)
{
IDataExtRet DataExtRet = ORItemLineRet2798.ItemLineRet.DataExtRetList.GetAt(i2825);
//Get value of OwnerID
if (DataExtRet.OwnerID != null)
{
string OwnerID2826 = (string)DataExtRet.OwnerID.GetValue();
}
//Get value of DataExtName
string DataExtName2827 = (string)DataExtRet.DataExtName.GetValue();
//Get value of DataExtType
ENDataExtType DataExtType2828 = (ENDataExtType)DataExtRet.DataExtType.GetValue();
//Get value of DataExtValue
string DataExtValue2829 = (string)DataExtRet.DataExtValue.GetValue();
}
}
}
}
if (ORItemLineRet2798.ItemGroupLineRet != null)
{
if (ORItemLineRet2798.ItemGroupLineRet != null)
{
//Get value of TxnLineID
string TxnLineID2830 = (string)ORItemLineRet2798.ItemGroupLineRet.TxnLineID.GetValue();
//Get value of ListID
if (ORItemLineRet2798.ItemGroupLineRet.ItemGroupRef.ListID != null)
{
string ListID2831 = (string)ORItemLineRet2798.ItemGroupLineRet.ItemGroupRef.ListID.GetValue();
}
//Get value of FullName
if (ORItemLineRet2798.ItemGroupLineRet.ItemGroupRef.FullName != null)
{
string FullName2832 = (string)ORItemLineRet2798.ItemGroupLineRet.ItemGroupRef.FullName.GetValue();
}
//Get value of Desc
if (ORItemLineRet2798.ItemGroupLineRet.Desc != null)
{
string Desc2833 = (string)ORItemLineRet2798.ItemGroupLineRet.Desc.GetValue();
}
//Get value of Quantity
if (ORItemLineRet2798.ItemGroupLineRet.Quantity != null)
{
int Quantity2834 = (int)ORItemLineRet2798.ItemGroupLineRet.Quantity.GetValue();
}
//Get value of UnitOfMeasure
if (ORItemLineRet2798.ItemGroupLineRet.UnitOfMeasure != null)
{
string UnitOfMeasure2835 = (string)ORItemLineRet2798.ItemGroupLineRet.UnitOfMeasure.GetValue();
}
if (ORItemLineRet2798.ItemGroupLineRet.OverrideUOMSetRef != null)
{
//Get value of ListID
if (ORItemLineRet2798.ItemGroupLineRet.OverrideUOMSetRef.ListID != null)
{
string ListID2836 = (string)ORItemLineRet2798.ItemGroupLineRet.OverrideUOMSetRef.ListID.GetValue();
}
//Get value of FullName
if (ORItemLineRet2798.ItemGroupLineRet.OverrideUOMSetRef.FullName != null)
{
string FullName2837 = (string)ORItemLineRet2798.ItemGroupLineRet.OverrideUOMSetRef.FullName.GetValue();
}
}
//Get value of TotalAmount
double TotalAmount2838 = (double)ORItemLineRet2798.ItemGroupLineRet.TotalAmount.GetValue();
if (ORItemLineRet2798.ItemGroupLineRet.ItemLineRetList != null)
{
for (int i2839 = 0; i2839 < ORItemLineRet2798.ItemGroupLineRet.ItemLineRetList.Count; i2839++)
{
IItemLineRet ItemLineRet = ORItemLineRet2798.ItemGroupLineRet.ItemLineRetList.GetAt(i2839);
//Get value of TxnLineID
string TxnLineID2840 = (string)ItemLineRet.TxnLineID.GetValue();
if (ItemLineRet.ItemRef != null)
{
//Get value of ListID
if (ItemLineRet.ItemRef.ListID != null)
{
string ListID2841 = (string)ItemLineRet.ItemRef.ListID.GetValue();
}
//Get value of FullName
if (ItemLineRet.ItemRef.FullName != null)
{
string FullName2842 = (string)ItemLineRet.ItemRef.FullName.GetValue();
}
}
if (ItemLineRet.InventorySiteRef != null)
{
//Get value of ListID
if (ItemLineRet.InventorySiteRef.ListID != null)
{
string ListID2843 = (string)ItemLineRet.InventorySiteRef.ListID.GetValue();
}
//Get value of FullName
if (ItemLineRet.InventorySiteRef.FullName != null)
{
string FullName2844 = (string)ItemLineRet.InventorySiteRef.FullName.GetValue();
}
}
if (ItemLineRet.InventorySiteLocationRef != null)
{
//Get value of ListID
if (ItemLineRet.InventorySiteLocationRef.ListID != null)
{
string ListID2845 = (string)ItemLineRet.InventorySiteLocationRef.ListID.GetValue();
}
//Get value of FullName
if (ItemLineRet.InventorySiteLocationRef.FullName != null)
{
string FullName2846 = (string)ItemLineRet.InventorySiteLocationRef.FullName.GetValue();
}
}
if (ItemLineRet.ORSerialLotNumber != null)
{
if (ItemLineRet.ORSerialLotNumber.SerialNumber != null)
{
//Get value of SerialNumber
if (ItemLineRet.ORSerialLotNumber.SerialNumber != null)
{
string SerialNumber2848 = (string)ItemLineRet.ORSerialLotNumber.SerialNumber.GetValue();
}
}
if (ItemLineRet.ORSerialLotNumber.LotNumber != null)
{
//Get value of LotNumber
if (ItemLineRet.ORSerialLotNumber.LotNumber != null)
{
string LotNumber2849 = (string)ItemLineRet.ORSerialLotNumber.LotNumber.GetValue();
}
}
}
//Get value of ExpirationDateForSerialLotNumber
if (ItemLineRet.ExpirationDateForSerialLotNumber != null)
{
string ExpDate = (string)ItemLineRet.ExpirationDateForSerialLotNumber.GetValue();
}
//Get value of Desc
if (ItemLineRet.Desc != null)
{
string Desc2850 = (string)ItemLineRet.Desc.GetValue();
}
//Get value of Quantity
if (ItemLineRet.Quantity != null)
{
int Quantity2851 = (int)ItemLineRet.Quantity.GetValue();
}
//Get value of UnitOfMeasure
if (ItemLineRet.UnitOfMeasure != null)
{
string UnitOfMeasure2852 = (string)ItemLineRet.UnitOfMeasure.GetValue();
}
if (ItemLineRet.OverrideUOMSetRef != null)
{
//Get value of ListID
if (ItemLineRet.OverrideUOMSetRef.ListID != null)
{
string ListID2853 = (string)ItemLineRet.OverrideUOMSetRef.ListID.GetValue();
}
//Get value of FullName
if (ItemLineRet.OverrideUOMSetRef.FullName != null)
{
string FullName2854 = (string)ItemLineRet.OverrideUOMSetRef.FullName.GetValue();
}
}
//Get value of Cost
if (ItemLineRet.Cost != null)
{
double Cost2855 = (double)ItemLineRet.Cost.GetValue();
}
//Get value of Amount
if (ItemLineRet.Amount != null)
{
double Amount2856 = (double)ItemLineRet.Amount.GetValue();
}
if (ItemLineRet.CustomerRef != null)
{
//Get value of ListID
if (ItemLineRet.CustomerRef.ListID != null)
{
string ListID2857 = (string)ItemLineRet.CustomerRef.ListID.GetValue();
}
//Get value of FullName
if (ItemLineRet.CustomerRef.FullName != null)
{
string FullName2858 = (string)ItemLineRet.CustomerRef.FullName.GetValue();
}
}
if (ItemLineRet.ClassRef != null)
{
//Get value of ListID
if (ItemLineRet.ClassRef.ListID != null)
{
string ListID2859 = (string)ItemLineRet.ClassRef.ListID.GetValue();
}
//Get value of FullName
if (ItemLineRet.ClassRef.FullName != null)
{
string FullName2860 = (string)ItemLineRet.ClassRef.FullName.GetValue();
}
}
if (ItemLineRet.SalesTaxCodeRef != null)
{
//Get value of ListID
if (ItemLineRet.SalesTaxCodeRef.ListID != null)
{
string ListID2861 = (string)ItemLineRet.SalesTaxCodeRef.ListID.GetValue();
}
//Get value of FullName
if (ItemLineRet.SalesTaxCodeRef.FullName != null)
{
string FullName2862 = (string)ItemLineRet.SalesTaxCodeRef.FullName.GetValue();
}
}
//Get value of BillableStatus
if (ItemLineRet.BillableStatus != null)
{
ENBillableStatus BillableStatus2863 = (ENBillableStatus)ItemLineRet.BillableStatus.GetValue();
}
if (ItemLineRet.SalesRepRef != null)
{
//Get value of ListID
if (ItemLineRet.SalesRepRef.ListID != null)
{
string ListID2864 = (string)ItemLineRet.SalesRepRef.ListID.GetValue();
}
//Get value of FullName
if (ItemLineRet.SalesRepRef.FullName != null)
{
string FullName2865 = (string)ItemLineRet.SalesRepRef.FullName.GetValue();
}
}
if (ItemLineRet.DataExtRetList != null)
{
for (int i2866 = 0; i2866 < ItemLineRet.DataExtRetList.Count; i2866++)
{
IDataExtRet DataExtRet = ItemLineRet.DataExtRetList.GetAt(i2866);
//Get value of OwnerID
if (DataExtRet.OwnerID != null)
{
string OwnerID2867 = (string)DataExtRet.OwnerID.GetValue();
}
//Get value of DataExtName
string DataExtName2868 = (string)DataExtRet.DataExtName.GetValue();
//Get value of DataExtType
ENDataExtType DataExtType2869 = (ENDataExtType)DataExtRet.DataExtType.GetValue();
//Get value of DataExtValue
string DataExtValue2870 = (string)DataExtRet.DataExtValue.GetValue();
}
}
}
}
if (ORItemLineRet2798.ItemGroupLineRet.DataExtList != null)
{
for (int i2871 = 0; i2871 < ORItemLineRet2798.ItemGroupLineRet.DataExtList.Count; i2871++)
{
IDataExt DataExt = ORItemLineRet2798.ItemGroupLineRet.DataExtList.GetAt(i2871);
//Get value of OwnerID
string OwnerID2872 = (string)DataExt.OwnerID.GetValue();
//Get value of DataExtName
string DataExtName2873 = (string)DataExt.DataExtName.GetValue();
//Get value of DataExtValue
string DataExtValue2874 = (string)DataExt.DataExtValue.GetValue();
}
}
}
}
}
}
if (CheckRet.DataExtRetList != null)
{
for (int i2875 = 0; i2875 < CheckRet.DataExtRetList.Count; i2875++)
{
IDataExtRet DataExtRet = CheckRet.DataExtRetList.GetAt(i2875);
//Get value of OwnerID
if (DataExtRet.OwnerID != null)
{
string OwnerID2876 = (string)DataExtRet.OwnerID.GetValue();
}
//Get value of DataExtName
string DataExtName2877 = (string)DataExtRet.DataExtName.GetValue();
//Get value of DataExtType
ENDataExtType DataExtType2878 = (ENDataExtType)DataExtRet.DataExtType.GetValue();
//Get value of DataExtValue
string DataExtValue2879 = (string)DataExtRet.DataExtValue.GetValue();
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment