Ejemplo n.º 1
0
        public DOXAPI.Document asDocument(string customerID, string customerName, string filename)
        {
            // Convert local class object to DOX-Pro document object
            DOXAPI.Document docInv = new DOXAPI.Document();
            docInv.DocType = flexInvoiceType;
            // Set documents fields according to doc-type
            docInv.Fields = new DOXAPI.Field[flexInvoiceType.Attributes.Length];
            for (int i = 0; i < docInv.Fields.Length; i++)
            {
                DOXAPI.Field f = new DOXAPI.Field();
                f.Attr = flexInvoiceType.Attributes[i];
                switch (f.Attr.Name)
                {
                case "Customer ID":
                    f.Value = customerID;
                    break;

                case "Invoice No":
                    f.Value = company + InvoiceNo;
                    break;

                case "Packing Slips":
                    f.Value = removeDuplicates(PackingSlips);
                    break;

                case "Issue Date":
                    f.Value = IssueDate;
                    break;

                default:
                    f.Value = null;
                    break;
                }
                docInv.Fields[i] = f;
            }
            docInv.Title    = InvoiceNo + "/" + IssueDate.ToShortDateString();
            docInv.FileName = filename;
            return(docInv);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Add name and date to the issue description
 /// </summary>
 /// <param name="bAll">specify true to include name and date</param>
 /// <returns>complete issue description</returns>
 public string GetIssueDetails(bool bAll)
 {
     return(GetIssueDetails() +
            "\r\nName: " + FirstName + " " + LastName
            + " Date: " + IssueDate.ToShortDateString());
 }
Ejemplo n.º 3
0
 public override string ToString()
 {
     return(CitationNumber + " " + IssueDate.ToShortDateString() + " " + ViolationCode + " " + Violation + " " + Amount.ToString());
 }