Пример #1
0
        private bool _Load(int loanID, string path)
        {
            this.iLoanID = loanID;
            clsCSVTable tbl = new clsCSVTable(path);

            if (loanID < tbl.Length())
            {
                this.iPropertyID                      = Int32.Parse(tbl.Value(loanID, clsLoan.PropertyColumn));
                this.iTitleHolderEntityID             = Int32.Parse(tbl.Value(loanID, clsLoan.TitleHolderColumn));
                this.iCoBorrowerEntityID              = Int32.Parse(tbl.Value(loanID, clsLoan.CoBorrowerColumn));
                this.iAcquisitionTitleCompanyEntityID = Int32.Parse(tbl.Value(loanID, clsLoan.TitleCompanyColumn));
                this.iLenderEntityID                  = Int32.Parse(tbl.Value(loanID, clsLoan.LenderColumn));
                this.dtMaturity    = DateTime.Parse(tbl.Value(loanID, clsLoan.MaturityDateCoumn));
                this.dtOrigination = DateTime.Parse(tbl.Value(loanID, clsLoan.OGDateColumn));
                this.dRate         = Double.Parse(tbl.Value(loanID, clsLoan.RateColumn));
                this.dPenaltyRate  = Double.Parse(tbl.Value(loanID, clsLoan.PenaltyRateColumn));
                this.pProperty     = new clsProperty(this.iPropertyID);
                this._LoadCashflows();
                return(true);
            }
            else
            {
                return(false);
            }
        }
Пример #2
0
 private bool _Load(int id, clsCSVTable tbl)
 {
     if (id < tbl.Length())
     {
         this.iDocumentID = id;
         this.strName = tbl.Value(id, clsDocument.NameColumn);
         this.iPropertyID = Int32.Parse(tbl.Value(id, clsDocument.PropertyColumn));
         this.tType = (clsDocument.Type)Int32.Parse(tbl.Value(id, clsDocument.TypeColumn));
         return true;
     }
     else
     {
         return false;
     }
 }
Пример #3
0
        public static List <string> AddressList()
        {
            List <string> returnValue = new List <string>();
            clsCSVTable   tbl         = new clsCSVTable(clsProperty.strPropertyPath);
            int           streetNumber;
            string        streetName;

            // compile list as [street name] [8 digit street number]
            for (int i = 0; i < tbl.Length(); i++)
            {
                string s = tbl.Value(i, clsProperty.AddressColumn);
                streetNumber = Int32.Parse(System.Text.RegularExpressions.Regex.Match(s, @"\d+").Value);
                streetName   = System.Text.RegularExpressions.Regex.Replace(s, streetNumber.ToString(), "").Trim();
                returnValue.Add(streetName + " " + streetNumber.ToString("00000000"));
            }
            // sort list, so it's alphabetical by street name and then street number
            returnValue.Sort();
            // put list back to [street number] [street name]
            for (int i = 0; i < returnValue.Count; i++)
            {
                streetNumber   = Int32.Parse(returnValue[i].Substring(returnValue[i].Length - 8));
                streetName     = returnValue[i].Substring(0, returnValue[i].Length - 9);
                returnValue[i] = streetNumber.ToString() + " " + streetName;
            }

            return(returnValue);
        }
        private bool _Load(int id)
        {
            clsCSVTable tbl = new clsCSVTable(clsDocument.strDocumentPath);

            if (id < tbl.Length())
            {
                this.iDocumentID = id;
                this.strName     = tbl.Value(id, clsDocument.NameColumn);
                this.iPropertyID = Int32.Parse(tbl.Value(id, clsDocument.PropertyColumn));
                this.tType       = (clsDocument.Type)Int32.Parse(tbl.Value(id, clsDocument.TypeColumn));
                return(true);
            }
            else
            {
                return(false);
            }
        }
Пример #5
0
        public static int IDFromAddress(string address)
        {
            clsCSVTable tbl = new clsCSVTable(clsProperty.strPropertyPath);
            int         id  = -1;

            for (int i = 0; i < tbl.Length(); i++)
            {
                if (tbl.Value(i, clsProperty.AddressColumn) == address)
                {
                    id = i;
                }
            }
            return(id);
        }
Пример #6
0
        private bool _Load(int id)
        {
            clsCSVTable tbl = new clsCSVTable(clsEntity.strEntityPath);

            if (id < tbl.Length())
            {
                this.iEntityID  = id;
                this.strName    = tbl.Value(id, clsEntity.NameColumn);
                this.strAddress = tbl.Value(id, clsEntity.AddressColumn);
                this.strTown    = tbl.Value(id, clsEntity.TownColumn);
                this.strState   = tbl.Value(id, clsEntity.StateColumn);
                Console.WriteLine(tbl.Value(id, clsEntity.ZipCodeColumn));
                this.iZipCode       = Int32.Parse(tbl.Value(id, clsEntity.ZipCodeColumn));
                this.strPhone       = tbl.Value(id, clsEntity.PhoneNumberColumn);
                this.strContactName = tbl.Value(id, clsEntity.ContactNameColumn);
                this.strEmail       = tbl.Value(id, clsEntity.ContactEmailColumn);
                return(true);
            }
            else
            {
                return(false);
            }
        }
Пример #7
0
        private void _LoadCashflows(string path)
        {
            clsCSVTable tbl = new clsCSVTable(path);

            this.cfCashflows = new List <clsCashflow>();
            int iCFLoanID;

            for (int i = 0; i < tbl.Length(); i++)
            {
                if (Int32.TryParse(tbl.Value(i, clsCashflow.LoanColumn), out iCFLoanID))
                {
                    if (iCFLoanID == this.iLoanID)
                    {
                        this.cfCashflows.Add(new clsCashflow(i, tbl));
                    }
                }
            }
        }
Пример #8
0
 private bool _Load(int id, clsCSVTable tbl)
 {
     if (id < tbl.Length())
     {
         this.iDocumentRecordID = id;
         this.dtAction          = DateTime.Parse(tbl.Value(id, clsDocumentRecord.ActionDateColumn));
         this.dtRecord          = DateTime.Parse(tbl.Value(id, clsDocumentRecord.RecordDateColumn));
         this.eStatus           = (clsDocumentRecord.Status)Int32.Parse(tbl.Value(id, clsDocumentRecord.StatusColumn));
         this.eTransmission     = (clsDocumentRecord.Transmission)Int32.Parse(tbl.Value(id, clsDocumentRecord.TransmissionColumn));
         this.iDocumentID       = Int32.Parse(tbl.Value(id, clsDocumentRecord.DocumentColumn));
         this.iSenderEntityID   = Int32.Parse(tbl.Value(id, clsDocumentRecord.SenderColumn));
         this.iReceiverEntityID = Int32.Parse(tbl.Value(id, clsDocumentRecord.ReceiverColumn));
         return(true);
     }
     else
     {
         return(false);
     }
 }
Пример #9
0
 private bool _Load(int transactionID, clsCSVTable tbl)
 {
     if (transactionID < tbl.Length())
     {
         this.iTransactionID = transactionID;
         this.dtPayDate      = DateTime.Parse(tbl.Value(transactionID, clsCashflow.TransactionDateColumn));
         this.dtRecordDate   = DateTime.Parse(tbl.Value(transactionID, clsCashflow.RecordDateColumn));
         this.dtDeleteDate   = DateTime.Parse(tbl.Value(transactionID, clsCashflow.DeleteDateColumn));
         if (this.dtDeleteDate > new DateTime(2999, 12, 31))
         {
             this.dtDeleteDate = DateTime.MaxValue;
         }
         this.dAmount    = Double.Parse(tbl.Value(transactionID, clsCashflow.AmountColumn));
         this.iLoanID    = Int32.Parse(tbl.Value(transactionID, clsCashflow.LoanColumn));
         this.eTypeID    = (clsCashflow.Type)Int32.Parse(tbl.Value(transactionID, clsCashflow.TransactionTypeColumn));
         this.bActual    = Boolean.Parse(tbl.Value(transactionID, clsCashflow.ActualColumn));
         this.strComment = tbl.Value(transactionID, clsCashflow.CommentColumn);
         return(true);
     }
     else
     {
         return(false);
     }
 }
Пример #10
0
        public static int LoanID(string address)
        {
            clsCSVTable tblLoans = new clsCSVTable(clsLoan.strLoanPath);
            int         loanID   = -1;

            // Find PropertyID from Address First
            int propertyID = clsProperty.IDFromAddress(address);

            if (propertyID == -1)
            {
                return(-1);
            }

            // Now match propertyID to the loan
            for (int i = 0; i < tblLoans.Length(); i++)
            {
                if (tblLoans.Value(i, clsLoan.PropertyColumn) == propertyID.ToString())
                {
                    loanID = i;
                }
            }
            return(loanID);
        }
Пример #11
0
 private bool _Load(int loanRecordingID, clsCSVTable tbl)
 {
     this.iRecordingID = loanRecordingID;
     if (loanRecordingID < tbl.Length())
     {
         this.iRecordingID = Int32.Parse(tbl.Value(loanRecordingID, clsLoanRecording.IndexColumn));
         this.iBook        = Int32.Parse(tbl.Value(loanRecordingID, clsLoanRecording.BookColumn));
         this.iPage        = Int32.Parse(tbl.Value(loanRecordingID, clsLoanRecording.PageColumn));
         this.iInstrument  = Int32.Parse(tbl.Value(loanRecordingID, clsLoanRecording.InstrumentColumn));
         this.iParcel      = Int32.Parse(tbl.Value(loanRecordingID, clsLoanRecording.ParcelColumn));
         this.dtRecording  = DateTime.Parse(tbl.Value(loanRecordingID, clsLoanRecording.RecordingDateColumn));
         return(true);
     }
     else
     {
         return(false);
     }
 }
Пример #12
0
 private bool _Load(int propertyID, clsCSVTable tbl)
 {
     if (propertyID < tbl.Length())
     {
         this.iPropertyID = propertyID;
         this.strAddress  = tbl.Value(propertyID, clsProperty.AddressColumn);
         this.strTown     = tbl.Value(propertyID, clsProperty.TownColumn);
         this.strCounty   = tbl.Value(propertyID, clsProperty.CountyColumn);
         this.strState    = tbl.Value(propertyID, clsProperty.StateColumn);
         if (!double.TryParse(tbl.Value(propertyID, clsProperty.BPOColumn), out this.dBPO))
         {
             this.dBPO = 0;
         }
         //                this.dBPO = Double.Parse(tbl.Value(propertyID, clsProperty.BPOColumn));
         this.strNickname = tbl.Value(propertyID, clsProperty.NickNameColumn);
         return(true);
     }
     else
     {
         return(false);
     }
 }