コード例 #1
0
        private void _TestEntity()
        {
            for (int i = 0; i < 3; i++)
            {
                clsEntity entity = new clsEntity(i);
                Console.WriteLine(entity.Name() + "," + entity.Address() + "," + entity.Phone());
            }

            clsCSVTable testTable = new clsCSVTable(clsEntity.strEntityPath);

            testTable.SaveAs("/Users/" + Environment.UserName + "/Documents/Professional/Resilience/tblEntityTest.csv");
            clsEntity newEntity = new clsEntity("test entity", "42 wallaby way", "sydney", "AU", 33000, "312-fnd-nemo", "marlin", "*****@*****.**");

            Console.WriteLine(newEntity.Save("/Users/" + Environment.UserName + "/Documents/Professional/Resilience/tblEntityTest.csv"));
        }
コード例 #2
0
        private void _TestDocument()
        {
            for (int i = 0; i < 25; i++)
            {
                clsDocument document = new clsDocument(i);
                Console.WriteLine(document.Name() + "," + document.PropertyAddress() + "," + document.DocumentType().ToString() + "," +
                                  ((int)document.DocumentType()).ToString());
            }
            clsCSVTable testTable = new clsCSVTable(clsDocument.strDocumentPath);

            testTable.SaveAs("/Users/" + Environment.UserName + "/Documents/Professional/Resilience/tblDocumentTest.csv");

            clsDocument newDoc = new clsDocument("test", 1, clsDocument.Type.ClosingProtectionLetter);

            Console.WriteLine(newDoc.Save("/Users/" + Environment.UserName + "/Documents/Professional/Resilience/tblDocumentTest.csv"));
        }
コード例 #3
0
        private void _TestDocumentRecord()
        {
            for (int i = 0; i < 25; i++)
            {
                clsDocumentRecord docRec = new clsDocumentRecord(i);
                Console.WriteLine(docRec.StatusType().ToString() + "," + docRec.TransmissionType().ToString() + "," +
                                  docRec.DocumentID().ToString() + "," + docRec.ReceiverID().ToString());
            }

            clsCSVTable testTable = new clsCSVTable(clsDocumentRecord.strDocumentRecordPath);

            testTable.SaveAs("/Users/" + Environment.UserName + "/Documents/Professional/Resilience/tblDocumentRecordTest.csv");
            clsDocumentRecord newRec = new clsDocumentRecord(1, System.DateTime.Now, System.DateTime.Today, 1, 2,
                                                             clsDocumentRecord.Status.Notarized,
                                                             clsDocumentRecord.Transmission.Electronic);

            Console.WriteLine(newRec.Save("/Users/" + Environment.UserName + "/Documents/Professional/Resilience/tblDocumentRecordTest.csv"));
        }
コード例 #4
0
        private void _TestCashflow()
        {
            clsCashflow cf = new clsCashflow(47);

            Console.WriteLine(cf.TransactionID() + "," + cf.Amount() + "," + cf.PayDate());

            clsCSVTable testTable = new clsCSVTable(clsCashflow.strCashflowPath);

            testTable.SaveAs("/Users/" + Environment.UserName + "/Documents/Professional/Resilience/tblCashflowTest.csv");

            DateTime pd  = DateTime.Today;
            DateTime rd  = DateTime.Today;
            DateTime dd  = DateTime.MaxValue;
            int      pid = 17;
            double   a   = 100000;
            bool     act = false;

            clsCashflow.Type t      = clsCashflow.Type.RehabDraw;
            clsCashflow      cfTest = new clsCashflow(pd, rd, dd, pid, a, act, t);

            Console.WriteLine(cfTest.Save("/Users/" + Environment.UserName + "/Documents/Professional/Resilience/tblCashflowTest.csv"));
        }
コード例 #5
0
        private void _TestProperty()
        {
            clsProperty property = new clsProperty(14);

            Console.WriteLine(property.PropertyID() + "," + property.Address());

            clsCSVTable tbl = new clsCSVTable(clsProperty.strPropertyPath);

            tbl.SaveAs("/Users/" + Environment.UserName + "/Documents/Professional/Resilience/tblPropertyTest.csv");
            clsProperty badproperty = new clsProperty("no", "no", "no", "no", -1, "no");

            Console.WriteLine(badproperty.Save("/Users/" + Environment.UserName + "/Documents/Professional/Resilience/tblPropertyTest.csv"));

            tbl = new clsCSVTable(clsProperty.strPropertyPath);
            string[] strNewRecord = new string[tbl.Width() - 1];
            for (int i = 0; i < strNewRecord.Length; i++)
            {
                strNewRecord[i] = "new " + i.ToString();
            }
            tbl.New(strNewRecord);
            tbl.SaveAs("/Users/" + Environment.UserName + "/Documents/Professional/Resilience/tblPropertyTest.csv");
        }