Пример #1
0
 public LoanAuction(Parent parent,int investorId)
 {
     InvestorId = investorId;
     /*Borrower information*/
     ParentId = parent.ID;
     BorrowerFullName = parent.FirstName + " " + parent.LastName;
     StudentName = parent.StudentFirstName + " " + parent.StudentLastName;
     ParentCertificate = parent.Certificate;
     /*School information*/
     SchoolName = parent.School.SchoolName;
     SchoolCertificate = parent.School.Certificate;
     /*Loan information*/
     LoanRate = parent.Rate;
     LoanWithRate = parent.LoanWithRate;
     TotalBid = parent.Investments.Count;
     TotalBidAmount = parent.Investments.Count == 0 ? 0 : parent.Investments.Sum(x => x.BidAmount);
     Term = parent.Term.KindTerm;
     DateStart = parent.FundingDate;
     BidRate = parent.Investments.Any(x => x.InvestorId == InvestorId) ? parent.Investments.FirstOrDefault(x => x.InvestorId == InvestorId).BidRate : 0;
     BidAmount = parent.Investments.Any(x => x.InvestorId == InvestorId) ? parent.Investments.FirstOrDefault(x => x.InvestorId == InvestorId).BidAmount : 0;
 }
Пример #2
0
 public ParentRegister()
 {
     parent = new Parent();
 }