コード例 #1
0
            public XElement GenerateModRq(bool?ClearExpenseLines = null)
            {
                XElement xElement = new XElement(nameof(Bill) + "Mod");

                xElement.Add(TxnID?.ToQBXML(nameof(TxnID)));
                xElement.Add(TimeCreated?.ToQBXML(nameof(TimeCreated)));
                xElement.Add(TimeModified?.ToQBXML(nameof(TimeModified)));
                xElement.Add(EditSequence?.ToQBXML(nameof(EditSequence)));
                xElement.Add(TxnNumber?.ToQBXML(nameof(TxnNumber)));
                xElement.Add(VendorRef?.ToQBXML(nameof(VendorRef)));
                xElement.Add(VendorAddress?.ToQBXML(nameof(VendorAddress)));
                xElement.Add(APAccountRef?.ToQBXML(nameof(APAccountRef)));
                xElement.Add(TxnDate?.ToQBXML(nameof(TxnDate)));
                xElement.Add(DueDate?.ToQBXML(nameof(DueDate)));
                xElement.Add(AmountDue?.ToQBXML(nameof(AmountDue)));
                xElement.Add(CurrencyRef?.ToQBXML(nameof(CurrencyRef)));
                xElement.Add(ExchangeRate?.ToQBXML(nameof(ExchangeRate)));
                xElement.Add(AmountDueInHomeCurrency?.ToQBXML(nameof(AmountDueInHomeCurrency)));
                xElement.Add(RefNumber?.ToQBXML(nameof(RefNumber)));
                xElement.Add(TermsRef?.ToQBXML(nameof(TermsRef)));
                xElement.Add(Memo?.ToQBXML(nameof(Memo)));
                xElement.Add(IsTaxIncluded?.ToQBXML(nameof(IsTaxIncluded)));
                xElement.Add(SalesTaxCodeRef?.ToQBXML(nameof(SalesTaxCodeRef)));
                xElement.Add(IsPaid?.ToQBXML(nameof(IsPaid)));
                xElement.Add(ExternalGUID?.ToQBXML(nameof(ExternalGUID)));
                xElement.Add(LinkedTxnList?.ToQBXML(nameof(LinkedTxnList)));
                xElement.Add(ExpenseLineList?.ToQBXML(nameof(ExpenseLineList)));
                xElement.Add(ItemLineList?.ToQBXML(nameof(ItemLineList)));
                xElement.Add(OpenAmount?.ToQBXML(nameof(OpenAmount)));
                xElement.Add(DataExtList?.ToQBXML(nameof(DataExtList)));

                return(xElement);
            }
コード例 #2
0
        /// <summary>
        /// Returns a string representation of the packet. This is
        /// a human readable formated representation that has nothing
        /// to do with OpenPGP or RFC2440
        /// </summary>
        /// <returns>String representation of the packet.</returns>
        /// <remarks>No remarks</remarks>
        public override string ToString()
        {
            string strReturn = "";

            strReturn += "Signature Packet:\r\n";
            strReturn += "Version: " + Version.ToString() + "\r\n";
            strReturn += "Signaturetype: " + SignatureType.ToString() + "\r\n";
            strReturn += "Signaturealgorithm: " + SignatureAlgorithm.ToString() + "\r\n";
            strReturn += "Hashalgorithm: " + HashAlgorithm.ToString() + "\r\n";
            strReturn += "Time Created: " + TimeCreated.ToLocalTime() + "\r\n";
            strReturn += "KeyID: " + KeyID + "\r\n";
            strReturn += "Hashed Subpackets: " + HashedSubPackets.Length + "\r\n";

            for (int i = 0; i < HashedSubPackets.Length; i++)
            {
                strReturn += HashedSubPackets[i].ToString() + "\r\n";
            }

            strReturn += "\r\nUnhashed Subpackets: " + UnhashedSubPackets.Length + "\r\n";
            for (int i = 0; i < UnhashedSubPackets.Length; i++)
            {
                strReturn += UnhashedSubPackets[i].ToString() + "\r\n";
            }

            strReturn += "Key Material:\r\n";

            for (int i = 0; i < Signature.Length; i++)
            {
                strReturn += Signature[i].ToString(16) + "\r\n\r\n";
            }

            return(strReturn + "----\r\n\r\n");
        }
コード例 #3
0
            public override XElement GenerateAddRq()
            {
                XElement xElement = new XElement(nameof(BillPaymentCheck) + "Add");

                xElement.Add(TxnID?.ToQBXML(nameof(TxnID)));
                xElement.Add(TimeCreated?.ToQBXML(nameof(TimeCreated)));
                xElement.Add(TimeModified?.ToQBXML(nameof(TimeModified)));
                xElement.Add(EditSequence?.ToQBXML(nameof(EditSequence)));
                xElement.Add(TxnNumber?.ToQBXML(nameof(TxnNumber)));
                xElement.Add(PayeeEntityRef?.ToQBXML(nameof(PayeeEntityRef)));
                xElement.Add(APAccountRef?.ToQBXML(nameof(APAccountRef)));
                xElement.Add(TxnDate?.ToQBXML(nameof(TxnDate)));
                xElement.Add(BankAccountRef?.ToQBXML(nameof(BankAccountRef)));
                xElement.Add(Amount?.ToQBXML(nameof(Amount)));
                xElement.Add(CurrencyRef?.ToQBXML(nameof(CurrencyRef)));
                xElement.Add(ExchangeRate?.ToQBXML(nameof(ExchangeRate)));
                xElement.Add(AmountInHomeCurrency?.ToQBXML(nameof(AmountInHomeCurrency)));
                xElement.Add(RefNumber?.ToQBXML(nameof(RefNumber)));
                xElement.Add(Memo?.ToQBXML(nameof(Memo)));
                xElement.Add(Address?.ToQBXML(nameof(Address)));
                xElement.Add(IsToBePrinted?.ToQBXML(nameof(IsToBePrinted)));
                xElement.Add(ExternalGUID?.ToQBXML(nameof(ExternalGUID)));
                xElement.Add(AppliedToTxnList?.ToQBXML(nameof(AppliedToTxnList)));
                xElement.Add(DataExtList?.ToQBXML(nameof(DataExtList)));

                return(xElement);
            }
コード例 #4
0
            public XElement GenerateModRq(bool?ClearExpenseLines = null)
            {
                XElement xElement = new XElement(nameof(BillPaymentCreditCard) + "Mod");

                xElement.Add(TxnID?.ToQBXML(nameof(TxnID)));
                xElement.Add(TimeCreated?.ToQBXML(nameof(TimeCreated)));
                xElement.Add(TimeModified?.ToQBXML(nameof(TimeModified)));
                xElement.Add(EditSequence?.ToQBXML(nameof(EditSequence)));
                xElement.Add(TxnNumber?.ToQBXML(nameof(TxnNumber)));
                xElement.Add(PayeeEntityRef?.ToQBXML(nameof(PayeeEntityRef)));
                xElement.Add(APAccountRef?.ToQBXML(nameof(APAccountRef)));
                xElement.Add(TxnDate?.ToQBXML(nameof(TxnDate)));
                xElement.Add(CreditCardAccountRef?.ToQBXML(nameof(CreditCardAccountRef)));
                xElement.Add(Amount?.ToQBXML(nameof(Amount)));
                xElement.Add(CurrencyRef?.ToQBXML(nameof(CurrencyRef)));
                xElement.Add(ExchangeRate?.ToQBXML(nameof(ExchangeRate)));
                xElement.Add(AmountInHomeCurrency?.ToQBXML(nameof(AmountInHomeCurrency)));
                xElement.Add(RefNumber?.ToQBXML(nameof(RefNumber)));
                xElement.Add(Memo?.ToQBXML(nameof(Memo)));
                xElement.Add(ExternalGUID?.ToQBXML(nameof(ExternalGUID)));
                xElement.Add(AppliedToTxnList?.ToQBXML(nameof(AppliedToTxnList)));
                xElement.Add(DataExtList?.ToQBXML(nameof(DataExtList)));

                return(xElement);
            }
コード例 #5
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (Author != null ? Author.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ TimeCreated.GetHashCode();
         hashCode = (hashCode * 397) ^ TimeEdited.GetHashCode();
         return(hashCode);
     }
 }
コード例 #6
0
        public override string ToString()
        {
            string returnString = "";

            if (Important)
            {
                returnString += "<!>";
            }
            returnString += TimeCreated.ToString("yy-MM-dd HH:mm:ss");
            returnString += $" {Creator.LastName} ({Creator.EmployeeID}): {Content}";
            return(returnString);
        }
コード例 #7
0
 public bool Equals(ChatMessage other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(Equals(Author, other.Author) && TimeCreated.Equals(other.TimeCreated) && TimeEdited.Equals(other.TimeEdited));
 }
コード例 #8
0
ファイル: BillingRate.cs プロジェクト: GTravesty/QBSDK
            public XElement GenerateModRq(bool?ClearExpenseLines = null)
            {
                XElement xElement = new XElement(nameof(BillingRate) + "Mod");

                xElement.Add(ListID?.ToQBXML(nameof(ListID)));
                xElement.Add(TimeCreated?.ToQBXML(nameof(TimeCreated)));
                xElement.Add(TimeModified?.ToQBXML(nameof(TimeModified)));
                xElement.Add(EditSequence?.ToQBXML(nameof(EditSequence)));
                xElement.Add(Name?.ToQBXML(nameof(Name)));
                xElement.Add(BillingRateType.ToQBXML(nameof(BillingRateType)));
                xElement.Add(BillingRatePerItemList?.ToQBXML(nameof(BillingRatePerItem)));

                return(xElement);
            }
コード例 #9
0
ファイル: BillingRate.cs プロジェクト: GTravesty/QBSDK
            public override XElement GenerateAddRq()
            {
                XElement xElement = new XElement(nameof(BillingRate) + "Add");

                xElement.Add(ListID?.ToQBXML(nameof(ListID)));
                xElement.Add(TimeCreated?.ToQBXML(nameof(TimeCreated)));
                xElement.Add(TimeModified?.ToQBXML(nameof(TimeModified)));
                xElement.Add(EditSequence?.ToQBXML(nameof(EditSequence)));
                xElement.Add(Name?.ToQBXML(nameof(Name)));
                xElement.Add(BillingRateType.ToQBXML(nameof(BillingRateType)));
                xElement.Add(BillingRatePerItemList?.ToQBXML(nameof(BillingRatePerItem)));

                return(xElement);
            }
コード例 #10
0
            public XElement ToQBXML(string name)
            {
                XElement xElement = new XElement(name);

                xElement.Add(ListID.ToQBXML(nameof(ListID)));
                xElement.Add(TimeCreated.ToQBXML(nameof(TimeCreated)));
                xElement.Add(TimeModified.ToQBXML(nameof(TimeModified)));
                xElement.Add(EditSequence.ToQBXML(nameof(EditSequence)));
                xElement.Add(Contact.ToQBXML(nameof(Contact)));
                xElement.Add(Salutation.ToQBXML(nameof(Salutation)));
                xElement.Add(FirstName.ToQBXML(nameof(FirstName)));
                xElement.Add(MiddleName.ToQBXML(nameof(MiddleName)));
                xElement.Add(LastName.ToQBXML(nameof(LastName)));
                xElement.Add(JobTitle.ToQBXML(nameof(JobTitle)));
                xElement.Add(AdditionalContactRef?.ToQBXML(nameof(AdditionalContactRef)));
                return(xElement);
            }
コード例 #11
0
        /// <summary>
        /// Returns a string representation of the packet. This is
        /// a human readable formated representation that has nothing
        /// to do with OpenPGP or RFC2440
        /// </summary>
        /// <returns>String representation of the packet.</returns>
        /// <remarks>No remarks</remarks>
        public override string ToString()
        {
            string strReturn = "";

            strReturn += "PublicKeyPacket:\r\n";
            strReturn += "Version: " + Version.ToString() + "\r\n";
            strReturn += "Algorithm: " + Algorithm.ToString() + "\r\n";
            strReturn += "Time Created: " + TimeCreated.ToLocalTime() + "\r\n";
            strReturn += "Fingerprint: 0x" + Fingerprint.ToString(16) + "\r\n";
            strReturn += "KeyID: " + KeyID.ToString() + "\r\n";
            strReturn += "Key Material:\r\n";

            for (int i = 0; i < KeyMaterial.Length; i++)
            {
                strReturn += KeyMaterial[i].ToString(16) + "\r\n\r\n";
            }

            return(strReturn + "----\r\n\r\n");
        }
コード例 #12
0
ファイル: Comment.cs プロジェクト: Lipindim/TaskManager
 public override string ToString()
 {
     return($"{User.FIO} ({TimeCreated.ToString("dd.MM.yyyy HH:mm")}) \n {Text}");
 }
コード例 #13
0
 public bool isExpired()
 {
     return(TimeCreated.AddSeconds(TimeToLive) > DateTime.Now);
 }