public bool ExportClientRegistration() { try { this.peachtreeObj = new PeachtreeSingleTon(); Export export = (Export)this.peachtreeObj.AppObj.CreateExporter(PeachwIEObj.peachwIEObjCompanyInformation); export.ClearExportFieldList(); export.AddToExportFieldList((short)PeachwIEObjCompanyInformationField.peachwIEObjCompanyInformationField_CompanyName); export.AddToExportFieldList((short)PeachwIEObjCompanyInformationField.peachwIEObjCompanyInformationField_CompanyCity); export.AddToExportFieldList((short)PeachwIEObjCompanyInformationField.peachwIEObjCompanyInformationField_CompanyAddressLine1); export.AddToExportFieldList((short)PeachwIEObjCompanyInformationField.peachwIEObjCompanyInformationField_CompanyAddressLine2); export.AddToExportFieldList((short)PeachwIEObjCompanyInformationField.peachwIEObjCompanyInformationField_CompanyZip); export.AddToExportFieldList((short)PeachwIEObjCompanyInformationField.peachwIEObjCompanyInformationField_Email); export.AddToExportFieldList((short)PeachwIEObjCompanyInformationField.peachwIEObjCompanyInformationField_Phone); export.AddToExportFieldList((short)PeachwIEObjCompanyInformationField.peachwIEObjCompanyInformationField_Fax); export.AddToExportFieldList((short)PeachwIEObjCompanyInformationField.peachwIEObjCompanyInformationField_CompanyState); export.AddToExportFieldList((short)PeachwIEObjCompanyInformationField.peachwIEObjCompanyInformationField_CompanyAddressLine2); export.AddToExportFieldList((short)PeachwIEObjCompanyInformationField.peachwIEObjCompanyInformationField_CompanyCountry); export.SetFileType(PeachwIEFileType.peachwIEFileTypeXML); export.SetFilename(this.FileNameXML); export.Export(); CommonFunction.GetUTF8Supported_XmlFilePath(this.FileNameXML, this.FileNameXML); return(true); } catch (Exception exception) { MessageBox.Show(exception.Message); return(false); } }
public bool ExportEditQuoteShortList(DateTime FromDate, DateTime EndDate) { try { this.peachtreeObj = new PeachtreeSingleTon(); Export export = (Export)this.peachtreeObj.AppObj.CreateExporter(PeachwIEObj.peachwIEObjSalesJournal); export.ClearExportFieldList(); export.SetFileType(PeachwIEFileType.peachwIEFileTypeXML); //_Quote=true means it is qute export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_Quote); export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_CustomerId); export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_Date); export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_QuoteNumber); export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_ARAmount); export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_TransactionGUID); export.SetDateFilterValue(PeachwIEDateFilterOperation.peachwIEDateFilterOperationRange, FromDate, EndDate); export.SetFilename(this.FileNameXML); export.Export(); CommonFunction.GetUTF8Supported_XmlFilePath(this.FileNameXML, this.FileNameXML); return(true); } catch (Exception exception) { MessageBox.Show(exception.Message); return(false); } }
public bool ExportSaleOrderNumbers(string cusid, DateTime FromDate, DateTime EndDate) { try { this.peachtreeObj = new PeachtreeSingleTon(); Export export = (Export)this.peachtreeObj.AppObj.CreateExporter(PeachwIEObj.peachwIEObjSalesOrders); export.ClearExportFieldList(); export.AddToExportFieldList((short)PeachwIEObjSalesOrdersField.peachwIEObjSalesOrdersField_enProposal); export.AddToExportFieldList((short)PeachwIEObjSalesOrdersField.peachwIEObjSalesOrdersField_SalesOrderClosed); export.AddToExportFieldList((short)PeachwIEObjSalesOrdersField.peachwIEObjSalesOrdersField_SalesOrderNumber); export.AddToExportFieldList((short)PeachwIEObjSalesOrdersField.peachwIEObjSalesOrdersField_TransactionGUID); export.SetFileType(PeachwIEFileType.peachwIEFileTypeXML); export.SetFilename(this.FileNameXML); export.SetFilterValue(1, PeachwIEFilterOperation.peachwIEFilterOperationRange, cusid, cusid); export.SetDateFilterValue(PeachwIEDateFilterOperation.peachwIEDateFilterOperationRange, FromDate, EndDate); export.Export(); CommonFunction.GetUTF8Supported_XmlFilePath(this.FileNameXML, this.FileNameXML); return(true); } catch (Exception exception) { MessageBox.Show(exception.Message); return(false); } }
public bool ExportInventoryItemPrices(string itemid) { try { this.peachtreeObj = new PeachtreeSingleTon(); Export export = (Export)this.peachtreeObj.AppObj.CreateExporter(PeachwIEObj.peachwIEObjInventoryItemsList); export.ClearExportFieldList(); export.AddToExportFieldList((short)PeachwIEObjInventoryItemsListField.peachwIEObjInventoryItemsListField_Inactive); export.AddToExportFieldList((short)PeachwIEObjInventoryItemsListField.peachwIEObjInventoryItemsListField_ItemId); export.AddToExportFieldList((short)PeachwIEObjInventoryItemsListField.peachwIEObjInventoryItemsListField_PrimaryAttributeId1); export.AddToExportFieldList((short)PeachwIEObjInventoryItemsListField.peachwIEObjInventoryItemsListField_UnitPrice1); export.AddToExportFieldList((short)PeachwIEObjInventoryItemsListField.peachwIEObjInventoryItemsListField_UnitPrice2); export.AddToExportFieldList((short)PeachwIEObjInventoryItemsListField.peachwIEObjInventoryItemsListField_UnitPrice3); export.AddToExportFieldList((short)PeachwIEObjInventoryItemsListField.peachwIEObjInventoryItemsListField_UnitPrice4); export.AddToExportFieldList((short)PeachwIEObjInventoryItemsListField.peachwIEObjInventoryItemsListField_UnitPrice5); export.AddToExportFieldList((short)PeachwIEObjInventoryItemsListField.peachwIEObjInventoryItemsListField_UnitPrice6); export.AddToExportFieldList((short)PeachwIEObjInventoryItemsListField.peachwIEObjInventoryItemsListField_UnitPrice7); export.AddToExportFieldList((short)PeachwIEObjInventoryItemsListField.peachwIEObjInventoryItemsListField_UnitPrice8); export.AddToExportFieldList((short)PeachwIEObjInventoryItemsListField.peachwIEObjInventoryItemsListField_UnitPrice9); export.AddToExportFieldList((short)PeachwIEObjInventoryItemsListField.peachwIEObjInventoryItemsListField_UnitPrice10); export.SetFilterValue((short)PeachwIEObjInventoryItemsListFilter.peachwIEObjInventoryItemsListFilter_ItemId, PeachwIEFilterOperation.peachwIEFilterOperationRange, itemid, itemid); export.SetFileType(PeachwIEFileType.peachwIEFileTypeXML); export.SetFilename(this.FileNameXML); export.Export(); CommonFunction.GetUTF8Supported_XmlFilePath(this.FileNameXML, this.FileNameXML); return(true); } catch (Exception exception) { MessageBox.Show(exception.Message); return(false); } }
public bool ExportSaleOrderGUIDAndNO(DateTime FromDate, DateTime EndDate, string saleordernumber) { try { this.peachtreeObj = new PeachtreeSingleTon(); Export export = (Export)this.peachtreeObj.AppObj.CreateExporter(PeachwIEObj.peachwIEObjSalesOrders); export.ClearExportFieldList(); export.SetFileType(PeachwIEFileType.peachwIEFileTypeXML); //first list fields for distinction between Sale Order & other Transactions export.AddToExportFieldList((short)PeachwIEObjSalesOrdersField.peachwIEObjSalesOrdersField_enProposal); //short list export.AddToExportFieldList((short)PeachwIEObjSalesOrdersField.peachwIEObjSalesOrdersField_TransactionGUID); //so number is unique in peachtree export.SetFilterValue((short)PeachwIEObjSalesOrdersFilter.peachwIEObjSalesOrdersFilter_SalesOrderNumber, PeachwIEFilterOperation.peachwIEFilterOperationRange, saleordernumber, saleordernumber); export.SetDateFilterValue(PeachwIEDateFilterOperation.peachwIEDateFilterOperationRange, FromDate, EndDate); export.SetFilename(this.FileNameXML); export.Export(); CommonFunction.GetUTF8Supported_XmlFilePath(this.FileNameXML, this.FileNameXML); return(true); } catch (Exception exception) { MessageBox.Show(exception.Message); return(false); } }
public bool ExportEditSaleInvShortList(DateTime FromDate, DateTime EndDate) { try { this.peachtreeObj = new PeachtreeSingleTon(); Export export = (Export)this.peachtreeObj.AppObj.CreateExporter(PeachwIEObj.peachwIEObjSalesJournal); export.ClearExportFieldList(); //following are used to distinguish b/w quote -Credit Memo -Progres Billing from Invoice export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_Quote); export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_IsCreditMemo); export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_enProgressBillingInvoice); export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_CustomerId); export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_Date); export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_InvoiceNumber); export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_ARAmount); export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_TransactionGUID); export.SetDateFilterValue(PeachwIEDateFilterOperation.peachwIEDateFilterOperationRange, FromDate, EndDate); export.SetFileType(PeachwIEFileType.peachwIEFileTypeXML); export.SetFilename(this.FileNameXML); export.Export(); CommonFunction.GetUTF8Supported_XmlFilePath(this.FileNameXML, this.FileNameXML); return(true); } catch (Exception exception) { MessageBox.Show(exception.Message); return(false); } }
/// <summary> /// it will export Chart of accounts data (GUID,Type,Description,ID). if no error then return true. /// </summary> /// <returns></returns> public bool ExportDefaultAccounts() { try { peachtreeObj = new PeachtreeSingleTon(); //peachtreeObj.AppObj.GetActiveAccountsWithGuid(out chartofAccount, out chartofAccount, out chartofAccount, out chartofAccount); Export exp = (Export)peachtreeObj.AppObj.CreateExporter(PeachwIEObj.peachwIEObjDefaultAccounts); exp.ClearExportFieldList(); //exp.AddToExportFieldList((short)PeachwIEObjChartOfAccountsField.peachwIEObjChartOfAccountsField_GUID); //exp.AddToExportFieldList((short)PeachwIEObjChartOfAccountsField.peachwIEObjChartOfAccountsField_Type); //exp.AddToExportFieldList((short)PeachwIEObjChartOfAccountsField.peachwIEObjChartOfAccountsField_AccountTypeDescription); //exp.AddToExportFieldList((short)PeachwIEObjChartOfAccountsField.peachwIEObjChartOfAccountsField_GeneralLedgerId); //exp.AddToExportFieldList((short)PeachwIEObjChartOfAccountsField.peachwIEObjChartOfAccountsField_Inactive); //exp.AddToExportFieldList((short)PeachwIEObjChartOfAccountsField.peachwIEObjChartOfAccountsField_GeneralLedgerDescription ); exp.SetFileType(PeachwIEFileType.peachwIEFileTypeXML); exp.SetFilename(FileNameXML); exp.Export(); CommonFunction.GetUTF8Supported_XmlFilePath(FileNameXML, FileNameXML); return(true); } catch (System.Exception e) { MessageBox.Show(e.Message); return(false); } }
public bool ExportEmployeeAsSaleRep() { try { this.peachtreeObj = new PeachtreeSingleTon(); Export export = (Export)this.peachtreeObj.AppObj.CreateExporter(PeachwIEObj.peachwIEObjEmployeeList); export.ClearExportFieldList(); export.AddToExportFieldList((short)PeachwIEObjEmployeeListField.peachwIEObjEmployeeListField_EmployeeID); export.AddToExportFieldList((short)PeachwIEObjEmployeeListField.peachwIEObjEmployeeListField_EmployeeName); export.AddToExportFieldList((short)PeachwIEObjEmployeeListField.peachwIEObjEmployeeListField_EmployeeAddressLine1); export.AddToExportFieldList((short)PeachwIEObjEmployeeListField.peachwIEObjEmployeeListField_SalesRep); export.AddToExportFieldList((short)PeachwIEObjEmployeeListField.peachwIEObjEmployeeListField_GUID); export.AddToExportFieldList((short)PeachwIEObjEmployeeListField.peachwIEObjEmployeeListField_Inactive); export.SetFileType(PeachwIEFileType.peachwIEFileTypeXML); export.SetFilename(this.FileNameXML); export.Export(); CommonFunction.GetUTF8Supported_XmlFilePath(this.FileNameXML, this.FileNameXML); return(true); } catch (Exception exception) { MessageBox.Show(exception.Message); return(false); } }
public bool ImportSerializedAssemblyAccountsType() { try { this.peachtreeObj = new PeachtreeSingleTon(); Import import = (Import)this.peachtreeObj.AppObj.CreateImporter(PeachwIEObj.peachwIEObjInventoryItemsList); import.ClearImportFieldList(); import.AddToImportFieldList((short)PeachwIEObjInventoryItemsListField.peachwIEObjInventoryItemsListField_ItemId); import.AddToImportFieldList((short)PeachwIEObjInventoryItemsListField.peachwIEObjInventoryItemsListField_SalesAccountId); import.AddToImportFieldList((short)PeachwIEObjInventoryItemsListField.peachwIEObjInventoryItemsListField_InventoryAccountId); import.AddToImportFieldList((short)PeachwIEObjInventoryItemsListField.peachwIEObjInventoryItemsListField_InvChgAccountId); import.AddToImportFieldList((short)PeachwIEObjInventoryItemsListField.peachwIEObjInventoryItemsListField_NumComp); import.AddToImportFieldList((short)PeachwIEObjInventoryItemsListField.peachwIEObjInventoryItemsListField_RevisionNumber); import.AddToImportFieldList((short)PeachwIEObjInventoryItemsListField.peachwIEObjInventoryItemsListField_EffectiveDate); import.AddToImportFieldList((short)PeachwIEObjInventoryItemsListField.peachwIEObjInventoryItemsListField_ComponentNumber); import.AddToImportFieldList((short)PeachwIEObjInventoryItemsListField.peachwIEObjInventoryItemsListField_ComponentID); import.AddToImportFieldList((short)PeachwIEObjInventoryItemsListField.peachwIEObjInventoryItemsListField_QuantityNeeded); import.SetFileType(PeachwIEFileType.peachwIEFileTypeCSV); import.SetFilename(this.FileNameCSV3); import.Import(); return(true); } catch (Exception exception) { // MessageBox.Show(exception.Message); return(false); } }
public bool ExportEditSaleInvNumber(DateTime FromDate, DateTime EndDate, string invno) { try { this.peachtreeObj = new PeachtreeSingleTon(); Export export = (Export)this.peachtreeObj.AppObj.CreateExporter(PeachwIEObj.peachwIEObjSalesJournal); export.ClearExportFieldList(); export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_Quote); export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_IsCreditMemo); export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_enProgressBillingInvoice); export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_TransactionGUID); export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_InvoiceNumber); export.SetDateFilterValue(PeachwIEDateFilterOperation.peachwIEDateFilterOperationRange, FromDate, EndDate); export.SetFilterValue((short)PeachwIEObjSalesJournalFilter.peachwIEObjSalesJournalFilter_InvoiceNumber, PeachwIEFilterOperation.peachwIEFilterOperationRange, invno, invno); export.SetFileType(PeachwIEFileType.peachwIEFileTypeXML); export.SetFilename(this.FileNameXML); export.Export(); CommonFunction.GetUTF8Supported_XmlFilePath(this.FileNameXML, this.FileNameXML); return(true); } catch (Exception exception) { MessageBox.Show(exception.Message); return(false); } }
public bool ExportItems(string itemId, string toitemId, short itemClass) { try { this.peachtreeObj = new PeachtreeSingleTon(); Export export = (Export)this.peachtreeObj.AppObj.CreateExporter(PeachwIEObj.peachwIEObjInventoryItemsList); export.ClearExportFieldList(); export.SetFilterValue((short)PeachwIEObjInventoryItemsListFilter.peachwIEObjInventoryItemsListFilter_ItemId, PeachwIEFilterOperation.peachwIEFilterOperationRange, itemId, toitemId); switch (itemClass) { case 0: export.SetFilterValue((short)PeachwIEObjInventoryItemsListFilter.peachwIEObjInventoryItemsListFilter_ItemClass, PeachwIEFilterOperation.peachwIEFilterOperationEqualTo, "Non-stock item", "Non-stock item"); break; case 1: export.SetFilterValue((short)PeachwIEObjInventoryItemsListFilter.peachwIEObjInventoryItemsListFilter_ItemClass, PeachwIEFilterOperation.peachwIEFilterOperationEqualTo, "Stock item", "Stock item"); break; case 2: export.SetFilterValue((short)PeachwIEObjInventoryItemsListFilter.peachwIEObjInventoryItemsListFilter_ItemClass, PeachwIEFilterOperation.peachwIEFilterOperationEqualTo, "Description only", "Description only"); break; case 4: export.SetFilterValue((short)PeachwIEObjInventoryItemsListFilter.peachwIEObjInventoryItemsListFilter_ItemClass, PeachwIEFilterOperation.peachwIEFilterOperationEqualTo, "Service", "Service"); break; case 5: export.SetFilterValue((short)PeachwIEObjInventoryItemsListFilter.peachwIEObjInventoryItemsListFilter_ItemClass, PeachwIEFilterOperation.peachwIEFilterOperationEqualTo, "Labor", "Labor"); break; case 6: export.SetFilterValue((short)PeachwIEObjInventoryItemsListFilter.peachwIEObjInventoryItemsListFilter_ItemClass, PeachwIEFilterOperation.peachwIEFilterOperationEqualTo, "Activity item", "Activity item"); break; case 7: export.SetFilterValue((short)PeachwIEObjInventoryItemsListFilter.peachwIEObjInventoryItemsListFilter_ItemClass, PeachwIEFilterOperation.peachwIEFilterOperationEqualTo, "Charge item", "Charge item"); break; } export.SetFileType(PeachwIEFileType.peachwIEFileTypeXML); export.SetFilename(this.FileNameXML); export.Export(); CommonFunction.GetUTF8Supported_XmlFilePath(this.FileNameXML, this.FileNameXML); return(true); } catch (Exception exception) { MessageBox.Show(exception.Message); return(false); } }
public bool DeleteSaleOrder(ref string[] recToDel) { bool flag; try { this.peachtreeObj = new PeachtreeSingleTon(); this.peachtreeObj.AppObj.DeleteRecord(PeachBusObjects.pboSalesOrderEntry, PeachObjectKey.pboKey_ByGUID, ref recToDel); flag = true; } catch (Exception exception) { throw exception; } return(flag); }
public bool ImportNewItem() { try { this.peachtreeObj = new PeachtreeSingleTon(); Import import = (Import)this.peachtreeObj.AppObj.CreateImporter(PeachwIEObj.peachwIEObjInventoryItemsList); import.ClearImportFieldList(); import.SetFileType(PeachwIEFileType.peachwIEFileTypeXML); import.SetFilename(this.FileNameXML); import.Import(); return(true); } catch (Exception exception) { MessageBox.Show(exception.Message); return(false); } }
public bool ExportContacts() { try { this.peachtreeObj = new PeachtreeSingleTon(); Export export = (Export)this.peachtreeObj.AppObj.CreateExporter(PeachwIEObj.peachwIEObjContactsList); export.ClearExportFieldList(); export.SetFileType(PeachwIEFileType.peachwIEFileTypeXML); export.SetFilename(this.FileNameExportXML); export.Export(); CommonFunction.GetUTF8Supported_XmlFilePath(this.FileNameExportXML, this.FileNameExportXML); return(true); } catch (Exception) { throw; } }
public bool ExportSalesTaxAuthorities() { try { this.peachtreeObj = new PeachtreeSingleTon(); Export export = (Export)this.peachtreeObj.AppObj.CreateExporter(PeachwIEObj.peachwIEObjSalesTaxAuthorities); export.ClearExportFieldList(); export.SetFileType(PeachwIEFileType.peachwIEFileTypeXML); export.SetFilename(this.FileNameXML); export.Export(); CommonFunction.GetUTF8Supported_XmlFilePath(this.FileNameXML, this.FileNameXML); return(true); } catch (Exception exception) { MessageBox.Show(exception.Message); return(false); } }
public bool ExportTicket(String CusID) { try { this.peachtreeObj = new PeachtreeSingleTon(); Export export = (Export)this.peachtreeObj.AppObj.CreateExporter(PeachwIEObj.peachwIEObjTimeTicketRegister); export.ClearExportFieldList(); export.AddToExportFieldList((short)PeachwIEObjTimeTicketRegisterField.peachwIEObjTimeTicketRegisterField_EmployeeOrVendor); export.AddToExportFieldList((short)PeachwIEObjTimeTicketRegisterField.peachwIEObjTimeTicketRegisterField_RecordedById); export.AddToExportFieldList((short)PeachwIEObjTimeTicketRegisterField.peachwIEObjTimeTicketRegisterField_TicketNumber); export.AddToExportFieldList((short)PeachwIEObjTimeTicketRegisterField.peachwIEObjTimeTicketRegisterField_TicketDate); export.AddToExportFieldList((short)PeachwIEObjTimeTicketRegisterField.peachwIEObjTimeTicketRegisterField_UsedInSalesInvoice); export.AddToExportFieldList((short)PeachwIEObjTimeTicketRegisterField.peachwIEObjTimeTicketRegisterField_ItemId); export.AddToExportFieldList((short)PeachwIEObjTimeTicketRegisterField.peachwIEObjTimeTicketRegisterField_CustJobAdm); export.AddToExportFieldList((short)PeachwIEObjTimeTicketRegisterField.peachwIEObjTimeTicketRegisterField_CompletedForId); export.AddToExportFieldList((short)PeachwIEObjTimeTicketRegisterField.peachwIEObjTimeTicketRegisterField_UsedInPayroll); export.AddToExportFieldList((short)PeachwIEObjTimeTicketRegisterField.peachwIEObjTimeTicketRegisterField_BillType); export.AddToExportFieldList((short)PeachwIEObjTimeTicketRegisterField.peachwIEObjTimeTicketRegisterField_BillRate); export.AddToExportFieldList((short)PeachwIEObjTimeTicketRegisterField.peachwIEObjTimeTicketRegisterField_BillingStatus); export.AddToExportFieldList((short)PeachwIEObjTimeTicketRegisterField.peachwIEObjTimeTicketRegisterField_UnitDuration); export.AddToExportFieldList((short)PeachwIEObjTimeTicketRegisterField.peachwIEObjTimeTicketRegisterField_BillAmount); export.AddToExportFieldList((short)PeachwIEObjTimeTicketRegisterField.peachwIEObjTimeTicketRegisterField_MemoSalesInvoice); export.AddToExportFieldList((short)PeachwIEObjTimeTicketRegisterField.peachwIEObjTimeTicketRegisterField_Memo); export.AddToExportFieldList((short)PeachwIEObjTimeTicketRegisterField.peachwIEObjTimeTicketRegisterField_InvoiceNumUsed); export.SetDateFilterValue(PeachwIEDateFilterOperation.peachwIEDateFilterOperationAll, new DateTime(), new DateTime()); export.SetFilename(FileNameXML); export.SetFileType(PeachwIEFileType.peachwIEFileTypeXML); export.SetFilterValue((short)PeachwIEObjTimeTicketRegisterFilter.peachwIEObjTimeTicketRegisterFilter_CustomerId, PeachwIEFilterOperation.peachwIEFilterOperationRange, CusID, CusID); export.Export(); CommonFunction.GetUTF8Supported_XmlFilePath(this.FileNameXML, this.FileNameXML); return(true); } catch (Exception ex) { MessageBox.Show(ex.Message, "ExportTicket"); } return(false); }
/// <summary> /// it will export the sales jrnal of given customer and date range. /// it aims on exporting the sale order number that has been used in sales invoice. /// </summary> /// <param name="cusid"></param> /// <param name="FromDate"></param> /// <param name="EndDate"></param> /// <returns></returns> public bool ExportSaleInv(string cusid, DateTime FromDate, DateTime EndDate) { try { this.peachtreeObj = new PeachtreeSingleTon(); Export export = (Export)this.peachtreeObj.AppObj.CreateExporter(PeachwIEObj.peachwIEObjSalesJournal); export.ClearExportFieldList(); //the Quantity and SalesOrderDistNum is neceassary as it won't show the sale order number with out it. export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_ApplyToSalesOrder); export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_SalesOrderNumber); export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_SalesOrderDistNum); export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_Quantity); //export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_ItemId); //export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_Description); //export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_GLAccountId); //export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_UnitPrice); //export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_TaxType); //export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_Amount); //export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_InvoiceDistNum); // export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_ApplyToInvoiceDistNum); export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_Quote); export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_IsCreditMemo); export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_enProgressBillingInvoice); //export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_enApplyToProposal); export.SetFileType(PeachwIEFileType.peachwIEFileTypeXML); export.SetFilename(FileNameXML); export.SetFilterValue((short)PeachwIEObjSalesJournalFilter.peachwIEObjSalesJournalFilter_CustomerId, PeachwIEFilterOperation.peachwIEFilterOperationRange, cusid, cusid); export.SetDateFilterValue(PeachwIEDateFilterOperation.peachwIEDateFilterOperationRange, FromDate, EndDate); export.Export(); CommonFunction.GetUTF8Supported_XmlFilePath(this.FileNameXML, this.FileNameXML); return(true); } catch (Exception exception) { MessageBox.Show(exception.Message); return(false); } }
public bool ExportItems(string itemId, string toitemid) { try { this.peachtreeObj = new PeachtreeSingleTon(); Export export = (Export)this.peachtreeObj.AppObj.CreateExporter(PeachwIEObj.peachwIEObjInventoryItemsList); export.ClearExportFieldList(); export.SetFilterValue(0, PeachwIEFilterOperation.peachwIEFilterOperationRange, itemId, toitemid); export.SetFileType(PeachwIEFileType.peachwIEFileTypeXML); export.SetFilename(this.FileNameXML); export.Export(); CommonFunction.GetUTF8Supported_XmlFilePath(this.FileNameXML, this.FileNameXML); return(true); } catch (Exception exception) { MessageBox.Show(exception.Message); return(false); } }
public bool ExportEditSaleInvoice(string cusid, DateTime FromDate, DateTime EndDate) { try { this.peachtreeObj = new PeachtreeSingleTon(); Export export = (Export)this.peachtreeObj.AppObj.CreateExporter(PeachwIEObj.peachwIEObjSalesJournal); export.ClearExportFieldList(); export.SetFileType(PeachwIEFileType.peachwIEFileTypeXML); export.SetFilename(this.FileNameXML); export.SetFilterValue((short)PeachwIEObjSalesJournalFilter.peachwIEObjSalesJournalFilter_CustomerId, PeachwIEFilterOperation.peachwIEFilterOperationRange, cusid, cusid); export.SetDateFilterValue(PeachwIEDateFilterOperation.peachwIEDateFilterOperationRange, FromDate, EndDate); export.Export(); CommonFunction.GetUTF8Supported_XmlFilePath(this.FileNameXML, this.FileNameXML); return(true); } catch (Exception exception) { MessageBox.Show(exception.Message); return(false); } }
public bool ExportSaleOrder(DateTime FromDate, DateTime EndDate, string salordernumber) { try { this.peachtreeObj = new PeachtreeSingleTon(); Export export = (Export)this.peachtreeObj.AppObj.CreateExporter(PeachwIEObj.peachwIEObjSalesOrders); export.ClearExportFieldList(); export.SetFileType(PeachwIEFileType.peachwIEFileTypeXML); export.SetFilename(this.FileNameXML); export.SetFilterValue(0, PeachwIEFilterOperation.peachwIEFilterOperationRange, salordernumber, salordernumber); export.SetDateFilterValue(PeachwIEDateFilterOperation.peachwIEDateFilterOperationRange, FromDate, EndDate); export.Export(); CommonFunction.GetUTF8Supported_XmlFilePath(this.FileNameXML, this.FileNameXML); return(true); } catch (Exception exception) { MessageBox.Show(exception.Message); return(false); } }
public bool ImportUPCandPartNoItem() { try { this.peachtreeObj = new PeachtreeSingleTon(); Import import = (Import)this.peachtreeObj.AppObj.CreateImporter(PeachwIEObj.peachwIEObjInventoryItemsList); import.ClearImportFieldList(); import.AddToImportFieldList((short)PeachwIEObjInventoryItemsListField.peachwIEObjInventoryItemsListField_ItemId); import.AddToImportFieldList((short)PeachwIEObjInventoryItemsListField.peachwIEObjInventoryItemsListField_UPCSKU); import.AddToImportFieldList((short)PeachwIEObjInventoryItemsListField.peachwIEObjInventoryItemsListField_PartNumber); import.SetFileType(PeachwIEFileType.peachwIEFileTypeCSV); import.SetFilename(this.FileNameCSV); import.Import(); return(true); } catch (Exception exception) { MessageBox.Show(exception.Message); return(false); } }
/// <summary> /// it will export CostCode's data. if no error then return true. /// </summary> /// <returns></returns> public bool ExportCostCode() { try { peachtreeObj = new PeachtreeSingleTon(); Export exp = (Export)peachtreeObj.AppObj.CreateExporter(PeachwIEObj.peachwIEObjCostCodeList); exp.ClearExportFieldList(); exp.SetFileType(PeachwIEFileType.peachwIEFileTypeXML); exp.SetFilename(FileNameXML); exp.Export(); CommonFunction.GetUTF8Supported_XmlFilePath(FileNameXML, FileNameXML); return(true); } catch (System.Exception e) { MessageBox.Show(e.Message); return(false); } }
public bool ImportNonAssemblyItemAccount() { try { this.peachtreeObj = new PeachtreeSingleTon(); Import import = (Import)this.peachtreeObj.AppObj.CreateImporter(PeachwIEObj.peachwIEObjInventoryItemsList); import.ClearImportFieldList(); import.AddToImportFieldList((short)PeachwIEObjInventoryItemsListField.peachwIEObjInventoryItemsListField_ItemId); import.AddToImportFieldList((short)PeachwIEObjInventoryItemsListField.peachwIEObjInventoryItemsListField_SalesAccountId); import.AddToImportFieldList((short)PeachwIEObjInventoryItemsListField.peachwIEObjInventoryItemsListField_InventoryAccountId); import.AddToImportFieldList((short)PeachwIEObjInventoryItemsListField.peachwIEObjInventoryItemsListField_InvChgAccountId); import.SetFileType(PeachwIEFileType.peachwIEFileTypeCSV); import.SetFilename(this.FileNameCSV1); import.Import(); return(true); } catch (Exception exception) { // MessageBox.Show(exception.Message); return(false); } }
public bool ExportShippingMethod() { try { this.peachtreeObj = new PeachtreeSingleTon(); Export export = (Export)this.peachtreeObj.AppObj.CreateExporter(PeachwIEObj.peachwIEObjShippingMethods); export.ClearExportFieldList(); export.AddToExportFieldList((short )PeachwIEObjShippingMethodsField.peachwIEObjShippingMethodsField_GUID); export.AddToExportFieldList((short )PeachwIEObjShippingMethodsField.peachwIEObjShippingMethodsField_ShippingMethod); export.AddToExportFieldList((short )PeachwIEObjShippingMethodsField.peachwIEObjShippingMethodsField_ShippingMethodNumber); export.SetFileType(PeachwIEFileType.peachwIEFileTypeXML); export.SetFilename(this.FileNameXML); export.Export(); CommonFunction.GetUTF8Supported_XmlFilePath(this.FileNameXML, this.FileNameXML); return(true); } catch (Exception exception) { MessageBox.Show(exception.Message); return(false); } }
public bool ExportInventoryItemDefault() { try { this.peachtreeObj = new PeachtreeSingleTon(); Export export = (Export)this.peachtreeObj.AppObj.CreateExporter(PeachwIEObj.peachwIEObjInventoryItemDefaults); export.ClearExportFieldList(); export.AddToExportFieldList((short)PeachwIEObjInventoryItemDefaultsField.peachwIEObjInventoryItemDefaultsField_PriceLevel1); export.AddToExportFieldList((short)PeachwIEObjInventoryItemDefaultsField.peachwIEObjInventoryItemDefaultsField_PriceLevel2); export.AddToExportFieldList((short)PeachwIEObjInventoryItemDefaultsField.peachwIEObjInventoryItemDefaultsField_PriceLevel3); export.AddToExportFieldList((short)PeachwIEObjInventoryItemDefaultsField.peachwIEObjInventoryItemDefaultsField_PriceLevel4); export.AddToExportFieldList((short)PeachwIEObjInventoryItemDefaultsField.peachwIEObjInventoryItemDefaultsField_PriceLevel5); export.AddToExportFieldList((short)PeachwIEObjInventoryItemDefaultsField.peachwIEObjInventoryItemDefaultsField_PriceLevel6); export.AddToExportFieldList((short)PeachwIEObjInventoryItemDefaultsField.peachwIEObjInventoryItemDefaultsField_PriceLevel7); export.AddToExportFieldList((short)PeachwIEObjInventoryItemDefaultsField.peachwIEObjInventoryItemDefaultsField_PriceLevel8); export.AddToExportFieldList((short)PeachwIEObjInventoryItemDefaultsField.peachwIEObjInventoryItemDefaultsField_PriceLevel9); export.AddToExportFieldList((short)PeachwIEObjInventoryItemDefaultsField.peachwIEObjInventoryItemDefaultsField_PriceLevel10); export.AddToExportFieldList((short)PeachwIEObjInventoryItemDefaultsField.peachwIEObjInventoryItemDefaultsField_PriceLevel1Enabled); export.AddToExportFieldList((short)PeachwIEObjInventoryItemDefaultsField.peachwIEObjInventoryItemDefaultsField_PriceLevel2Enabled); export.AddToExportFieldList((short)PeachwIEObjInventoryItemDefaultsField.peachwIEObjInventoryItemDefaultsField_PriceLevel3Enabled); export.AddToExportFieldList((short)PeachwIEObjInventoryItemDefaultsField.peachwIEObjInventoryItemDefaultsField_PriceLevel4Enabled); export.AddToExportFieldList((short)PeachwIEObjInventoryItemDefaultsField.peachwIEObjInventoryItemDefaultsField_PriceLevel5Enabled); export.AddToExportFieldList((short)PeachwIEObjInventoryItemDefaultsField.peachwIEObjInventoryItemDefaultsField_PriceLevel6Enabled); export.AddToExportFieldList((short)PeachwIEObjInventoryItemDefaultsField.peachwIEObjInventoryItemDefaultsField_PriceLevel7Enabled); export.AddToExportFieldList((short)PeachwIEObjInventoryItemDefaultsField.peachwIEObjInventoryItemDefaultsField_PriceLevel8Enabled); export.AddToExportFieldList((short)PeachwIEObjInventoryItemDefaultsField.peachwIEObjInventoryItemDefaultsField_PriceLevel9Enabled); export.AddToExportFieldList((short)PeachwIEObjInventoryItemDefaultsField.peachwIEObjInventoryItemDefaultsField_PriceLevel10Enabled); export.SetFileType(PeachwIEFileType.peachwIEFileTypeXML); export.SetFilename(this.FileNameXML); export.Export(); CommonFunction.GetUTF8Supported_XmlFilePath(this.FileNameXML, this.FileNameXML); return(true); } catch (Exception exception) { MessageBox.Show(exception.Message); return(false); } }
public bool ExportJob() { try { this.peachtreeObj = new PeachtreeSingleTon(); Export export = (Export)this.peachtreeObj.AppObj.CreateExporter(PeachwIEObj.peachwIEObjJobList); export.ClearExportFieldList(); export.AddToExportFieldList((short)PeachwIEObjJobListField.peachwIEObjJobListField_JobId); export.AddToExportFieldList((short)PeachwIEObjJobListField.peachwIEObjJobListField_JobGUID); export.AddToExportFieldList((short)PeachwIEObjJobListField.peachwIEObjJobListField_UsePhases); export.AddToExportFieldList((short)PeachwIEObjJobListField.peachwIEObjJobListField_Inactive); export.SetFileType(PeachwIEFileType.peachwIEFileTypeXML); export.SetFilename(this.FileNameXML); export.Export(); CommonFunction.GetUTF8Supported_XmlFilePath(this.FileNameXML, this.FileNameXML); return(true); } catch (Exception exception) { MessageBox.Show(exception.Message); return(false); } }
public string[] ImportQuote() { string[] gUIDs = new string[1]; try { this.peachtreeObj = new PeachtreeSingleTon(); Import import = (Import)this.peachtreeObj.AppObj.CreateImporter(PeachwIEObj.peachwIEObjSalesJournal); import.ClearImportFieldList(); import.AddToImportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_CustomerId); import.AddToImportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_CustomerName); import.AddToImportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_InvoiceNumber); import.AddToImportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_Date); import.AddToImportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_Quote); import.AddToImportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_QuoteNumber); import.AddToImportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_QuoteGoodThruDate); import.AddToImportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_DropShip); import.AddToImportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_ShipToName); import.AddToImportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_ShipToAddressLine1); import.AddToImportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_ShipToAddressLine2); import.AddToImportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_ShipToCity); import.AddToImportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_ShipToState); import.AddToImportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_ShipToZip); import.AddToImportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_ShipToCountry); import.AddToImportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_CustomerPurchaseOrder); import.AddToImportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_ShipVia); //imp.AddToImportFieldList((short)PeachwIEObjSalesJournalField .peachwIEObjSalesJournalField_ShipDate); import.AddToImportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_DateDue); import.AddToImportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_DiscountAmount); import.AddToImportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_DiscountDate); import.AddToImportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_DisplayedTerms); import.AddToImportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_SalesRepId); import.AddToImportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_ARAccountId); import.AddToImportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_ARAmount); import.AddToImportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_SalesTaxCode); import.AddToImportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_InvoiceNote); import.AddToImportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_NotePrintsAfterLineItems); import.AddToImportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_StatementNote); import.AddToImportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_StatementNotePrintsBeforeInvoiceRef); //imp.AddToImportFieldList((short)PeachwIEObjSalesJournalField .peachwIEObjSalesJournalField_BeginningBalanceTransaction); //imp.AddToImportFieldList((short)PeachwIEObjSalesJournalField .peachwIEObjSalesJournalField_DateClearedInAccountRec); import.AddToImportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_NumberOfDistributions); //imp.AddToImportFieldList((short)PeachwIEObjSalesJournalField .peachwIEObjSalesJournalField_ApplyToSalesOrder); //imp.AddToImportFieldList((short)PeachwIEObjSalesJournalField .peachwIEObjSalesJournalField_SalesOrderNumber); //imp.AddToImportFieldList((short)PeachwIEObjSalesJournalField .peachwIEObjSalesJournalField_SalesOrderDistNum); import.AddToImportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_Quantity); import.AddToImportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_ItemId); import.AddToImportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_enSerialNumber); import.AddToImportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_Description); import.AddToImportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_GLAccountId); import.AddToImportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_UnitPrice); import.AddToImportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_TaxType); import.AddToImportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_Amount); import.AddToImportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_InventoryAccountId); import.AddToImportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_CostOfSalesAccountId); //imp.AddToImportFieldList((short)PeachwIEObjSalesJournalField .peachwIEObjSalesJournalField_CostOfSalesAmount); import.AddToImportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_JobId); import.AddToImportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_SalesTaxAuthority); //imp.AddToImportFieldList((short)PeachwIEObjSalesJournalField .peachwIEObjSalesJournalField_TransactionPeriod); //imp.AddToImportFieldList((short)PeachwIEObjSalesJournalField .peachwIEObjSalesJournalField_TransactionNumber); import.AddToImportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_ReceiptNum); import.AddToImportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_InvoiceNote2); //imp.AddToImportFieldList((short)PeachwIEObjSalesJournalField .peachwIEObjSalesJournalField_ShipByDate); //imp.AddToImportFieldList((short)PeachwIEObjSalesJournalField .peachwIEObjSalesJournalField_TransactionGUID); import.AddToImportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_UPCSKU); import.AddToImportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_Weight); //imp.AddToImportFieldList((short)PeachwIEObjSalesJournalField .peachwIEObjSalesJournalField_ApplyToInvoiceNumber); //imp.AddToImportFieldList((short)PeachwIEObjSalesJournalField .peachwIEObjSalesJournalField_ReturnAuthorization); import.AddToImportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_InvoiceDistNum); import.AddToImportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_ApplyToInvoiceDistNum); import.AddToImportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_IsCreditMemo); //imp.AddToImportFieldList((short)PeachwIEObjSalesJournalField .peachwIEObjSalesJournalField_CustomerGUID); //imp.AddToImportFieldList((short)PeachwIEObjSalesJournalField .peachwIEObjSalesJournalField_SalesRepresentativeGUID); //imp.AddToImportFieldList((short)PeachwIEObjSalesJournalField .peachwIEObjSalesJournalField_ARAccountGUID); //imp.AddToImportFieldList((short)PeachwIEObjSalesJournalField .peachwIEObjSalesJournalField_ItemGUID); //imp.AddToImportFieldList((short)PeachwIEObjSalesJournalField .peachwIEObjSalesJournalField_GLAccountGUID); //imp.AddToImportFieldList((short)PeachwIEObjSalesJournalField .peachwIEObjSalesJournalField_INVAccountGUID); //imp.AddToImportFieldList((short)PeachwIEObjSalesJournalField .peachwIEObjSalesJournalField_COSTAccountGUID); //imp.AddToImportFieldList((short)PeachwIEObjSalesJournalField .peachwIEObjSalesJournalField_JobGUID); //imp.AddToImportFieldList((short)PeachwIEObjSalesJournalField .peachwIEObjSalesJournalField_enGL_DateClearedInBankRec); //imp.AddToImportFieldList((short)PeachwIEObjSalesJournalField .peachwIEObjSalesJournalField_enInvAcntDateClearedInBankRec); //imp.AddToImportFieldList((short)PeachwIEObjSalesJournalField .peachwIEObjSalesJournalField_enCOSAcntDateClearedInBankRec); import.AddToImportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_enUMID); import.AddToImportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_enUMStockingUnits); import.AddToImportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_enStockingQuantity); import.AddToImportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_enUMStockingUnitPrice); //imp.AddToImportFieldList((short)PeachwIEObjSalesJournalField .peachwIEObjSalesJournalField_enVoidedBy); import.AddToImportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_enRetainagePercent); import.AddToImportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_enProgressBillingInvoice); import.AddToImportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_enApplyToProposal); import.SetFileType(PeachwIEFileType.peachwIEFileTypeCSV); import.SetFilename(this.FileNameCSV); import.ImportAndReturnGUIDs(out gUIDs); return(gUIDs); } catch (Exception exception) { MessageBox.Show(exception.Message); return(gUIDs); } }
public bool ExportSaleInvoice(DateTime FromDate, DateTime EndDate) { try { this.peachtreeObj = new PeachtreeSingleTon(); Export export = (Export)this.peachtreeObj.AppObj.CreateExporter(PeachwIEObj.peachwIEObjSalesJournal); export.ClearExportFieldList(); export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_CustomerId); export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_InvoiceNumber); export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_CustomerName); //export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_DropShip); export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_ShipToName); export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_ShipToAddressLine1); export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_ShipToAddressLine2); export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_ShipToCity); export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_ShipToState); export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_ShipToZip); export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_Date); export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_TransactionGUID); export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_CustomerPurchaseOrder); export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_ShipVia); //export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_ARAccountId); //export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_ARAmount); ////following are used to distinguish b/w quote -Credit Memo -Progres Billing from Invoice ////below 4 are for filtering invoice only //export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_BeginningBalanceTransaction); //export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_IsCreditMemo); export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_Quote); //export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_enProgressBillingInvoice ); //export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_NumberOfDistributions); //export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_SalesOrderDistNum); //export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_Quantity); //export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_ItemId); //export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_ItemGUID ); //export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_Description); //export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_GLAccountId); //export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_GLAccountGUID ); //export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_UnitPrice); //export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_Amount); //export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_TaxType ); //export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_SalesTaxAuthority); //export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_SalesRepId); ////export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_UPCSKU); //export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_CostOfSalesAmount); //export.AddToExportFieldList((short)PeachwIEObjSalesJournalField.peachwIEObjSalesJournalField_TransactionGUID); export.SetDateFilterValue(PeachwIEDateFilterOperation.peachwIEDateFilterOperationRange, FromDate, EndDate); export.SetFileType(PeachwIEFileType.peachwIEFileTypeXML); export.SetFilename(this.FileNameXML); export.Export(); CommonFunction.GetUTF8Supported_XmlFilePath(this.FileNameXML, this.FileNameXML); return(true); } catch (Exception exception) { MessageBox.Show(exception.Message); return(false); } }
public string[] ImportSaleOrder() { string[] gUIDs = new string[1]; try { this.peachtreeObj = new PeachtreeSingleTon(); Import import = (Import)this.peachtreeObj.AppObj.CreateImporter(PeachwIEObj.peachwIEObjSalesOrders); import.ClearImportFieldList(); import.AddToImportFieldList((short)PeachwIEObjSalesOrdersField.peachwIEObjSalesOrdersField_CustomerId); import.AddToImportFieldList((short)PeachwIEObjSalesOrdersField.peachwIEObjSalesOrdersField_CustomerName); import.AddToImportFieldList((short)PeachwIEObjSalesOrdersField.peachwIEObjSalesOrdersField_SalesOrderNumber); import.AddToImportFieldList((short)PeachwIEObjSalesOrdersField.peachwIEObjSalesOrdersField_Date); import.AddToImportFieldList((short)PeachwIEObjSalesOrdersField.peachwIEObjSalesOrdersField_SalesOrderClosed); import.AddToImportFieldList((short)PeachwIEObjSalesOrdersField.peachwIEObjSalesOrdersField_QuoteNumber); import.AddToImportFieldList((short)PeachwIEObjSalesOrdersField.peachwIEObjSalesOrdersField_DropShip); import.AddToImportFieldList((short)PeachwIEObjSalesOrdersField.peachwIEObjSalesOrdersField_ShipToName); import.AddToImportFieldList((short)PeachwIEObjSalesOrdersField.peachwIEObjSalesOrdersField_ShipToAddressLine1); import.AddToImportFieldList((short)PeachwIEObjSalesOrdersField.peachwIEObjSalesOrdersField_ShipToAddressLine2); import.AddToImportFieldList((short)PeachwIEObjSalesOrdersField.peachwIEObjSalesOrdersField_ShipToCity); import.AddToImportFieldList((short)PeachwIEObjSalesOrdersField.peachwIEObjSalesOrdersField_ShipToState); import.AddToImportFieldList((short)PeachwIEObjSalesOrdersField.peachwIEObjSalesOrdersField_ShipToZip); import.AddToImportFieldList((short)PeachwIEObjSalesOrdersField.peachwIEObjSalesOrdersField_ShipToCountry); import.AddToImportFieldList((short)PeachwIEObjSalesOrdersField.peachwIEObjSalesOrdersField_CustomerPurchaseOrder); import.AddToImportFieldList((short)PeachwIEObjSalesOrdersField.peachwIEObjSalesOrdersField_ShipVia); import.AddToImportFieldList((short)PeachwIEObjSalesOrdersField.peachwIEObjSalesOrdersField_DiscountAmount); import.AddToImportFieldList((short)PeachwIEObjSalesOrdersField.peachwIEObjSalesOrdersField_DisplayedTerms); import.AddToImportFieldList((short)PeachwIEObjSalesOrdersField.peachwIEObjSalesOrdersField_SalesRepId); import.AddToImportFieldList((short)PeachwIEObjSalesOrdersField.peachwIEObjSalesOrdersField_ARAccountId); import.AddToImportFieldList((short)PeachwIEObjSalesOrdersField.peachwIEObjSalesOrdersField_ARAmount); import.AddToImportFieldList((short)PeachwIEObjSalesOrdersField.peachwIEObjSalesOrdersField_SalesTaxCode); import.AddToImportFieldList((short)PeachwIEObjSalesOrdersField.peachwIEObjSalesOrdersField_InvoiceNote); import.AddToImportFieldList((short)PeachwIEObjSalesOrdersField.peachwIEObjSalesOrdersField_NotePrintsAfterLineItems); import.AddToImportFieldList((short)PeachwIEObjSalesOrdersField.peachwIEObjSalesOrdersField_StatementNote); import.AddToImportFieldList((short)PeachwIEObjSalesOrdersField.peachwIEObjSalesOrdersField_StatementPrintsBeforeInvoiceRef); import.AddToImportFieldList((short)PeachwIEObjSalesOrdersField.peachwIEObjSalesOrdersField_NumberOfDistributions); import.AddToImportFieldList((short)PeachwIEObjSalesOrdersField.peachwIEObjSalesOrdersField_SalesOrderDistNum); import.AddToImportFieldList((short)PeachwIEObjSalesOrdersField.peachwIEObjSalesOrdersField_Quantity); import.AddToImportFieldList((short)PeachwIEObjSalesOrdersField.peachwIEObjSalesOrdersField_ItemId); import.AddToImportFieldList((short)PeachwIEObjSalesOrdersField.peachwIEObjSalesOrdersField_Description); import.AddToImportFieldList((short)PeachwIEObjSalesOrdersField.peachwIEObjSalesOrdersField_GLAccountId); import.AddToImportFieldList((short)PeachwIEObjSalesOrdersField.peachwIEObjSalesOrdersField_UnitPrice); import.AddToImportFieldList((short)PeachwIEObjSalesOrdersField.peachwIEObjSalesOrdersField_TaxType); import.AddToImportFieldList((short)PeachwIEObjSalesOrdersField.peachwIEObjSalesOrdersField_Amount); import.AddToImportFieldList((short)PeachwIEObjSalesOrdersField.peachwIEObjSalesOrdersField_JobId); import.AddToImportFieldList((short)PeachwIEObjSalesOrdersField.peachwIEObjSalesOrdersField_SalesTaxAuthority); //imp.AddToImportFieldList((short)PeachwIEObjSalesOrdersField.peachwIEObjSalesOrdersField_TransactionPeriod); //imp.AddToImportFieldList((short)PeachwIEObjSalesOrdersField.peachwIEObjSalesOrdersField_TransactioNumber); import.AddToImportFieldList((short)PeachwIEObjSalesOrdersField.peachwIEObjSalesOrdersField_InvoiceNote2); import.AddToImportFieldList((short)PeachwIEObjSalesOrdersField.peachwIEObjSalesOrdersField_ShipByDate); //imp.AddToImportFieldList((short)PeachwIEObjSalesOrdersField.peachwIEObjSalesOrdersField_TransactionGUID); import.AddToImportFieldList((short)PeachwIEObjSalesOrdersField.peachwIEObjSalesOrdersField_UPCSKU); import.AddToImportFieldList((short)PeachwIEObjSalesOrdersField.peachwIEObjSalesOrdersField_Weight); //imp.AddToImportFieldList((short)PeachwIEObjSalesOrdersField.peachwIEObjSalesOrdersField_CustomerGUID); //imp.AddToImportFieldList((short)PeachwIEObjSalesOrdersField.peachwIEObjSalesOrdersField_SalesRepresentativeGUID); //imp.AddToImportFieldList((short)PeachwIEObjSalesOrdersField.peachwIEObjSalesOrdersField_ARAccountGUID); //imp.AddToImportFieldList((short)PeachwIEObjSalesOrdersField.peachwIEObjSalesOrdersField_GLAccountGUID); //imp.AddToImportFieldList((short)PeachwIEObjSalesOrdersField.peachwIEObjSalesOrdersField_ItemGUID); //imp.AddToImportFieldList((short)PeachwIEObjSalesOrdersField.peachwIEObjSalesOrdersField_JobGUID); import.AddToImportFieldList((short)PeachwIEObjSalesOrdersField.peachwIEObjSalesOrdersField_enUMID); import.AddToImportFieldList((short)PeachwIEObjSalesOrdersField.peachwIEObjSalesOrdersField_enUMStockingUnits); import.AddToImportFieldList((short)PeachwIEObjSalesOrdersField.peachwIEObjSalesOrdersField_enStockingQuantity); import.AddToImportFieldList((short)PeachwIEObjSalesOrdersField.peachwIEObjSalesOrdersField_enUMStockingUnitPrice); import.AddToImportFieldList((short)PeachwIEObjSalesOrdersField.peachwIEObjSalesOrdersField_enProposal); import.AddToImportFieldList((short)PeachwIEObjSalesOrdersField.peachwIEObjSalesOrdersField_enProposalAccepted); import.SetFileType(PeachwIEFileType.peachwIEFileTypeCSV); import.SetFilename(this.FileNameCSV); import.ImportAndReturnGUIDs(out gUIDs); return(gUIDs); } catch (Exception exception) { MessageBox.Show(exception.Message); return(gUIDs); } }