Exemple #1
0
        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 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 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);
     }
 }
Exemple #4
0
        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 ExportChartofAccount()
        {
            try
            {
                peachtreeObj = new PeachtreeSingleTon();

                //peachtreeObj.AppObj.GetActiveAccountsWithGuid(out chartofAccount, out chartofAccount, out chartofAccount, out chartofAccount);
                Export exp = (Export)peachtreeObj.AppObj.CreateExporter(PeachwIEObj.peachwIEObjChartOfAccounts);
                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);
            }
        }
Exemple #6
0
 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);
     }
 }
Exemple #7
0
        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);
            }
        }
Exemple #8
0
 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);
     }
 }
Exemple #9
0
 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);
     }
 }
Exemple #10
0
        /// <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 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 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);
        }
 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);
     }
 }
Exemple #14
0
        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);
            }
        }
Exemple #15
0
 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);
     }
 }