private Project GetProject(OpenCbsReader reader) { Project project = new Project(); project.Id = reader.GetInt("id"); project.ProjectStatus = (OProjectStatus)reader.GetSmallInt("status"); project.Code = reader.GetString("code"); project.Name = reader.GetString("name"); project.Aim = reader.GetString("aim"); project.BeginDate = reader.GetDateTime("begin_date"); project.Abilities = reader.GetString("abilities"); project.Experience = reader.GetString("experience"); project.Market = reader.GetString("market"); project.Concurrence = reader.GetString("concurrence"); project.Purpose = reader.GetString("purpose"); project.CorporateName = reader.GetString("corporate_name"); project.CorporateJuridicStatus = reader.GetString("corporate_juridicStatus"); project.CorporateFiscalStatus = reader.GetString("corporate_FiscalStatus"); project.CorporateSIRET = reader.GetString("corporate_siret"); project.CorporateRegistre = reader.GetString("corporate_registre"); project.CorporateCA = reader.GetMoney("corporate_CA"); project.CorporateNbOfJobs = reader.GetNullInt("corporate_nbOfJobs"); project.CorporateFinancialPlanType = reader.GetString("corporate_financialPlanType"); project.CorporateFinancialPlanAmount = reader.GetMoney("corporateFinancialPlanAmount"); project.CorporateFinancialPlanTotalAmount = reader.GetMoney("corporate_financialPlanTotalAmount"); project.Address = reader.GetString("address"); project.City = reader.GetString("city"); project.ZipCode = reader.GetString("zipCode"); int? districtId = reader.GetNullInt("district_id"); if (districtId.HasValue) project.District = new District { Id = districtId.Value }; project.HomePhone = reader.GetString("home_phone"); project.PersonalPhone = reader.GetString("personalPhone"); project.Email = reader.GetString("Email"); project.HomeType = reader.GetString("hometype"); return project; }
private static Installment GetInstallmentHistoryFromReader(OpenCbsReader r) { var i = new Installment { Number = r.GetInt("number"), ExpectedDate = r.GetDateTime("expected_date"), StartDate = r.GetDateTime("start_date"), CapitalRepayment = r.GetMoney("capital_repayment"), InterestsRepayment = r.GetMoney("interest_repayment"), PaidInterests = r.GetMoney("paid_interest"), PaidCapital = r.GetMoney("paid_capital"), PaidFees = r.GetMoney("paid_fees"), FeesUnpaid = r.GetMoney("fees_unpaid"), PaidDate = r.GetNullDateTime("paid_date"), Comment = r.GetString("comment"), OLB = r.GetMoney("olb"), IsPending = r.GetBool("pending") }; return i; }