// [FindsBy(How = How.XPath, Using = "/html/body/div[1]/div/div/div/main/section[2]/form/fieldset/button")]
        // private IWebElement _continueButtonXPath;

        public void FillOutYourBusinessPage(int howLongVal, string setAnnualTurnover, string fundingPurpose, string businessCustomers)
        {
            HowLongTrading.SetTradingTime(howLongVal);
            AnnualTurnover.setAnnualTurnover(setAnnualTurnover);
            NeedForFinance.SelectFundingPurpose(fundingPurpose);
            BusinessCustomers.SetBusinessCustomer(businessCustomers);
            _continueButton.Click();
        }
 public void FillOutYourBusinessPage(string legalEntity, string companyPostcode, int howLongVal, string setAnnualTurnover, string fundingPurpose, string businessCustomers)
 {
     LegalEntity.SetLegalEntity(legalEntity);
     CompanyAddress.EnterAutoAddress(companyPostcode);
     HowLongTrading.SetTradingTime(howLongVal);
     NeedForFinance.SelectFundingPurpose(fundingPurpose);
     AnnualTurnover.setAnnualTurnover(setAnnualTurnover);
     BusinessCustomers.SetBusinessCustomer(businessCustomers);
     _continueButton.Click();
 }
        public virtual int _GetUniqueIdentifier()
        {
            var hashCode = 399326290;

            hashCode = hashCode * -1521134295 + (Id?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (AnnualTurnover?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (B2B?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (B2C?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (PaymentTerm?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (AveragePaymentTerm?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (AverageInvoiceValue?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (EquityRatio?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (AlgorithmCount?.GetHashCode() ?? 0);
            hashCode = hashCode * -1521134295 + (Result?.GetHashCode() ?? 0);
            return(hashCode);
        }
Exemplo n.º 4
0
        }         // SaveToDb

        public override string ToString()
        {
            var sb = new StringBuilder();

            sb.AppendFormat(
                "Calculation Num 1 .........Medal Type {2} Medal: {0} " +
                "NormalizedScore: {1}% Score: {3} Offered amount: {4}\n",
                MedalClassification,
                StringBuilderExtention.ToPercent(TotalScoreNormalized),
                MedalType,
                TotalScore,
                OfferedLoanAmount
                );

            sb.AppendFormat(
                "{0}| {1}| {2}| {3}| {4}| {5}| {6}| {7}| {8} \n",
                "Parameter".PadRight(25),
                "Weight".PadRight(10),
                "MinScore".PadRight(10),
                "MaxScore".PadRight(10),
                "MinGrade".PadRight(10),
                "MaxGrade".PadRight(10),
                "Grade".PadRight(10),
                "Score".PadRight(10),
                "Value"
                );

            var summary = new Weight();

            Weight weight;

            if (MedalType != MedalType.SoleTrader)
            {
                weight = new Weight {
                    Value       = BusinessScore.ToString(CultureInfo.InvariantCulture),
                    FinalWeight = BusinessScoreWeight,
                    Grade       = (int)BusinessScoreGrade,
                    Score       = BusinessScoreScore
                };
                sb.AddWeight(weight, "BusinessScore", ref summary);
            }             // if

            if (MedalType == MedalType.Limited || MedalType == MedalType.OnlineLimited)
            {
                weight = new Weight {
                    Value       = TangibleEquity.ToString(CultureInfo.InvariantCulture),
                    FinalWeight = TangibleEquityWeight,
                    Grade       = (int)TangibleEquityGrade,
                    Score       = TangibleEquityScore
                };
                sb.AddWeight(weight, "TangibleEquity", ref summary);
            }             // if

            DateTime calcTime = CalculationTime;
            int      businessSeniorityYears = 0;
            decimal  ezbobSeniorityMonth    = 0;

            if (BusinessSeniority.HasValue)
            {
                businessSeniorityYears = (int)(calcTime - BusinessSeniority.Value).TotalDays / 365;
            }

            if (EzbobSeniority.HasValue)
            {
                ezbobSeniorityMonth = (decimal)(calcTime - EzbobSeniority.Value).TotalDays / (365.0M / 12.0M);
            }

            weight = new Weight {
                Value       = businessSeniorityYears.ToString(CultureInfo.InvariantCulture),
                FinalWeight = BusinessSeniorityWeight,
                Grade       = (int)BusinessSeniorityGrade,
                Score       = BusinessSeniorityScore
            };
            sb.AddWeight(weight, "BusinessSeniority", ref summary);

            weight = new Weight {
                Value       = ConsumerScore.ToString(CultureInfo.InvariantCulture),
                FinalWeight = ConsumerScoreWeight,
                Grade       = (int)ConsumerScoreGrade,
                Score       = ConsumerScoreScore
            };
            sb.AddWeight(weight, "ConsumerScore", ref summary);

            weight = new Weight {
                Value       = ezbobSeniorityMonth.ToString(CultureInfo.InvariantCulture),
                FinalWeight = EzbobSeniorityWeight,
                Grade       = (int)EzbobSeniorityGrade,
                Score       = EzbobSeniorityScore
            };
            sb.AddWeight(weight, "EzbobSeniority", ref summary);

            weight = new Weight {
                Value       = MaritalStatus.ToString(),
                FinalWeight = MaritalStatusWeight,
                Grade       = (int)MaritalStatusGrade,
                Score       = MaritalStatusScore
            };
            sb.AddWeight(weight, "MaritalStatus", ref summary);

            weight = new Weight {
                Value       = NumOfLoans.ToString(CultureInfo.InvariantCulture),
                FinalWeight = NumOfLoansWeight,
                Grade       = (int)NumOfLoansGrade,
                Score       = NumOfLoansScore
            };
            sb.AddWeight(weight, "NumOfLoans", ref summary);

            weight = new Weight {
                Value       = NumOfLateRepayments.ToString(CultureInfo.InvariantCulture),
                FinalWeight = NumOfLateRepaymentsWeight,
                Grade       = (int)NumOfLateRepaymentsGrade,
                Score       = NumOfLateRepaymentsScore
            };
            sb.AddWeight(weight, "NumOfLateRepayments", ref summary);

            weight = new Weight {
                Value       = NumOfEarlyRepayments.ToString(CultureInfo.InvariantCulture),
                FinalWeight = NumOfEarlyRepaymentsWeight,
                Grade       = (int)NumOfEarlyRepaymentsGrade,
                Score       = NumOfEarlyRepaymentsScore
            };
            sb.AddWeight(weight, "NumOfEarlyRepayments", ref summary);

            weight = new Weight {
                Value       = AnnualTurnover.ToString(CultureInfo.InvariantCulture),
                FinalWeight = AnnualTurnoverWeight,
                Grade       = (int)AnnualTurnoverGrade,
                Score       = AnnualTurnoverScore
            };
            sb.AddWeight(weight, "AnnualTurnover", ref summary);

            weight = new Weight {
                Value       = FreeCashFlow.ToString(CultureInfo.InvariantCulture),
                FinalWeight = FreeCashFlowWeight,
                Grade       = (int)FreeCashFlowGrade,
                Score       = FreeCashFlowScore
            };
            sb.AddWeight(weight, "FreeCashFlow", ref summary);

            weight = new Weight {
                Value       = NetWorth.ToString(CultureInfo.InvariantCulture),
                FinalWeight = NetWorthWeight,
                Grade       = (int)NetWorthGrade,
                Score       = NetWorthScore
            };
            sb.AddWeight(weight, "NetWorth", ref summary);

            bool isOnline =
                MedalType == MedalType.OnlineLimited ||
                MedalType == MedalType.OnlineNonLimitedNoBusinessScore ||
                MedalType == MedalType.OnlineNonLimitedWithBusinessScore;

            if (isOnline)
            {
                weight = new Weight {
                    Value       = NumberOfStores.ToString(CultureInfo.InvariantCulture),
                    FinalWeight = NumberOfStoresWeight,
                    Grade       = (int)NumberOfStoresGrade,
                    Score       = NumberOfStoresScore
                };
                sb.AddWeight(weight, "NumOfStores", ref summary);

                weight = new Weight {
                    Value       = PositiveFeedbacks.ToString(CultureInfo.InvariantCulture),
                    FinalWeight = PositiveFeedbacksWeight,
                    Grade       = (int)PositiveFeedbacksGrade,
                    Score       = PositiveFeedbacksScore
                };
                sb.AddWeight(weight, "PositiveFeedbacks", ref summary);
            }             // if

            sb.AppendLine("----------------------------------------------------------------------------------------------------------------------------------------");

            sb.AppendFormat("{0}| {1}| {2}| {3}| {4}| {5}| {6}| {7}| {8}\n",
                            "Sum".PadRight(25),
                            StringBuilderExtention.ToShort(summary.FinalWeight)
                            .PadRight(10),
                            "-".PadRight(10),
                            "-".PadRight(10),
                            "-".PadRight(10),
                            "-".PadRight(10),
                            summary.Grade.ToString(CultureInfo.InvariantCulture)
                            .PadRight(10),
                            StringBuilderExtention.ToShort(summary.Score)
                            .PadRight(10), summary.Value);

            return(sb.ToString());
        }         // ToString