Esempio n. 1
0
 internal ReservationToExchange(string reservationId, int?quantity, PurchasePrice billingRefundAmount, BillingInformation billingInformation)
 {
     ReservationId       = reservationId;
     Quantity            = quantity;
     BillingRefundAmount = billingRefundAmount;
     BillingInformation  = billingInformation;
 }
Esempio n. 2
0
        internal void GetDataFromExcel()
        {
            try
            {
                // Populating the data from Excel
                ExcelLib.PopulateInCollection(Base.ExcelPath, "FinanceDetails");

                //Edit PurchasePrice textbox
                PurchasePrice.Clear();
                Thread.Sleep(1000);
                PurchasePrice.SendKeys(ExcelLib.ReadData(2, "Purchase Price"));

                //Edit Mortgage textbox
                Mortgage.Clear();
                Thread.Sleep(1000);
                Mortgage.SendKeys(ExcelLib.ReadData(2, "Mortgage"));

                //Edit HomeValue textbox
                HomeValue.Clear();
                Thread.Sleep(1000);
                HomeValue.SendKeys(ExcelLib.ReadData(2, "Home Value"));
                HomeValue.SendKeys(Keys.Enter);


                //Click on the "Save" button
                NextButton.Click();
                Thread.Sleep(2000);
            }
            catch (Exception e)
            {
                Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Fail, "Test Failed, Add Finance Details Unsuccessfull", e.Message);
            }
        }
 public VendingMachine(int inventory, dynamic price)
 {
     canRack       = new CanRack(inventory);
     purchasePrice = new PurchasePrice(price);
     trxBox        = new CoinBox();
     box           = new CoinBox();
 }
Esempio n. 4
0
        public void AddData(string name, object value)
        {
            switch (name)
            {
            case "КодКонтента": ID.Add((int)value); break;

            case "Название": ContentName.Add((string)value); break;

            case "Рейтинг": Rating.Add(double.Parse(value.ToString())); break;

            case "Год": Year.Add((int)value); break;

            case "Сюжет": Story.Add((string)value); break;

            case "Продолжительность": Duration.Add((int)value); break;

            case "ЦенаПокупки": PurchasePrice.Add(double.Parse(value.ToString())); break;

            case "ЦенаПроката": RentalPrice.Add(double.Parse(value.ToString())); break;

            case "Постер": Poster.Add((string)value); break;

            default: MessageBox.Show($"Поле {name} отсутствует!"); break;
            }
        }
 internal ReservationToPurchaseExchange(string reservationOrderId, string reservationId, PurchaseRequestContent properties, PurchasePrice billingCurrencyTotal, OperationStatus?status)
 {
     ReservationOrderId   = reservationOrderId;
     ReservationId        = reservationId;
     Properties           = properties;
     BillingCurrencyTotal = billingCurrencyTotal;
     Status = status;
 }
 internal ReservationToReturnForExchange(string reservationId, int?quantity, PurchasePrice billingRefundAmount, BillingInformation billingInformation, OperationStatus?status)
 {
     ReservationId       = reservationId;
     Quantity            = quantity;
     BillingRefundAmount = billingRefundAmount;
     BillingInformation  = billingInformation;
     Status = status;
 }
Esempio n. 7
0
        public StringModel ToStringModel <BLModel, StringModel>()
        {
            Mapper.CreateMap <DealerPartsMaster, StringDealerPartsMaster>()
            .ForAllMembers(item => item.ToString().CutDownTo(50));

            var stringModel = Mapper.Map <DealerPartsMaster, StringDealerPartsMaster>(this);

            stringModel.ExtractionDate = ExtractionDate.DateTimeToString();
            stringModel.Description    = Description.CutDownTo(100);

            stringModel.ActivationDate = ActivationDate.DateToString();
            stringModel.UnitCost       = UnitCost.DecimalToString(2);
            stringModel.Weight         = Weight.DecimalToString(4);

            stringModel.Volume = Volume.DecimalToString(4);
            stringModel.Active = Active.CutDownTo(1);

            stringModel.PurchasePrice = PurchasePrice.DecimalToString(2);

            stringModel.InheritStock          = InheritStock.CutDownTo(1);
            stringModel.ReplacementMultiplier = ReplacementMultiplier.DecimalToString(2);

            if (Weight == 0)
            {
                stringModel.Weight = String.Empty;
            }
            //if (UnitCost == 0) stringModel.UnitCost = String.Empty;

            if (UnitCost == null)
            {
                stringModel.UnitCostCurrency = String.Empty;
            }

            if (Volume == 0)
            {
                stringModel.Volume = String.Empty;
            }

            if (BulkOrderQuantity1 == 0)
            {
                stringModel.BulkOrderQuantity1 = String.Empty;
            }

            if (BulkOrderQuantity2 == 0)
            {
                stringModel.BulkOrderQuantity2 = String.Empty;
            }

            if (MultipleOrderQty == 0)
            {
                stringModel.MultipleOrderQty = "1";                       //String.Empty;
            }
            Mapper.CreateMap <StringDealerPartsMaster, StringModel>();
            var stringModelRet = Mapper.Map <StringDealerPartsMaster, StringModel>(stringModel);


            return(stringModelRet);
        }
Esempio n. 8
0
        //Adding Repayment,Expenses and Liabilities
        internal void RepaymentExpensesLiabilities()
        {
            //To skip the highlighted option
            SkipButton?.Click();
            System.Threading.Thread.Sleep(5000);
            // Populating the data from Excel
            ExcelLib.PopulateInCollection(Base.ExcelPath, "AddNewProperty");
            OwnersSelect.Click();
            System.Threading.Thread.Sleep(5000);
            PropertiesSelect.Click();
            ClickingAddNewProperty.Click();
            //Value set for property page details
            PropertyName.SendKeys(ExcelLib.ReadData(2, "Value"));
            SearchAddress.SendKeys(ExcelLib.ReadData(33, "Value"));
            System.Threading.Thread.Sleep(5000);
            //Value set using google api
            var address = Global.Driver.driver.FindElements(By.ClassName("pac-item"))[0];

            address.Click();
            TargetRent.SendKeys(ExcelLib.ReadData(14, "Value"));
            LandArea.SendKeys(ExcelLib.ReadData(10, "Value"));
            BedRooms.SendKeys(ExcelLib.ReadData(11, "Value"));
            CarParks.SendKeys(ExcelLib.ReadData(12, "Value"));
            Description.SendKeys(ExcelLib.ReadData(13, "Value"));
            FloorArea.SendKeys(ExcelLib.ReadData(15, "Value"));
            BathRooms.SendKeys(ExcelLib.ReadData(16, "Value"));
            YearBuilt.SendKeys(ExcelLib.ReadData(9, "Value"));
            NextButton.Click();
            //Value set for financial details page
            System.Threading.Thread.Sleep(2000);
            PurchasePrice.SendKeys(ExcelLib.ReadData(17, "Value"));
            HomeValue.SendKeys(ExcelLib.ReadData(18, "Value"));
            Mortgage.SendKeys(ExcelLib.ReadData(19, "Value"));
            //Adding repayment option
            AddRepayment.Click();
            RepaymentAmount.SendKeys(ExcelLib.ReadData(2, "AddRepaymentfieldValue"));
            RepaymentStartDate.SendKeys(ExcelLib.ReadData(3, "AddRepaymentfieldValue"));
            //Adding expenses option
            AddExpense.Click();
            ExpenseAmount.SendKeys(ExcelLib.ReadData(2, "AddExpensefieldValue"));
            var ExpenseDescription = Global.Driver.driver.FindElement(By.ClassName("seven")).FindElement(By.ClassName("width")).FindElement(By.Id("Text1"));

            ExpenseDescription.SendKeys(ExcelLib.ReadData(3, "AddExpensefieldValue"));
            ExpenseDate.SendKeys(ExcelLib.ReadData(4, "AddExpensefieldValue"));
            NextButton2.Click();
            //Value set for financial details page
            TenantEmail.SendKeys(ExcelLib.ReadData(20, "Value"));
            FirstName.SendKeys(ExcelLib.ReadData(21, "Value"));
            LastName.SendKeys(ExcelLib.ReadData(22, "Value"));
            StartDate.SendKeys(ExcelLib.ReadData(23, "Value"));
            EndDate.SendKeys(ExcelLib.ReadData(24, "Value"));
            RentAmount.SendKeys(ExcelLib.ReadData(25, "Value"));
            PaymentStartDate.SendKeys(ExcelLib.ReadData(26, "Value"));
            //Adding liability option
            NewLiability.Click();
            Amount.SendKeys(ExcelLib.ReadData(2, "NewLiabilityFieldValue"));
            Save.Click();
        }
Esempio n. 9
0
        // Write the default parameterless contructor and another version that sets
        // the year, address, price, income and expanse

        public override string ToString()
        {
            return("Street Address: " + Address + "\n"
                   + "Year built: " + Year + "\n"
                   + "Purchase price: " + PurchasePrice.ToString("C") + "\n"
                   + "Income rent: " + IncomeFromRent.ToString("C") + "\n"
                   + "Montly expense: " + MontlyExpense.ToString("C") + "\n"
                   + "Montly earning: " + MontlyEarnings.ToString("C"));
        }
 public VendingMachineViewModel(int inventory, dynamic price)
 {
     canRack         = new CanRack(inventory);
     purchasePrice   = new PurchasePrice(price);
     trxBox          = new CoinBox();
     box             = new CoinBox();
     canPriceMessage = $"Please deposit {(this.purchasePrice.Price * .01).ToString("C2")}";
     MainTitle       = "WPF Vending Machine - Assignment 6";
     canMakeChange   = true;
 }
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = StringComparer.InvariantCultureIgnoreCase.GetHashCode(Ticker);
         hashCode = (hashCode * 397) ^ Shares.GetHashCode();
         hashCode = (hashCode * 397) ^ PurchasePrice.GetHashCode();
         hashCode = (hashCode * 397) ^ StringComparer.InvariantCultureIgnoreCase.GetHashCode(PurchaseDate);
         return(hashCode);
     }
 }
Esempio n. 12
0
        //Add new property
        internal void AddingProperty()
        {
            //To skip the highlighted option
            SkipButton?.Click();
            System.Threading.Thread.Sleep(5000);
            // Populating the data from Excel
            ExcelLib.PopulateInCollection(Base.ExcelPath, "AddNewProperty");
            System.Threading.Thread.Sleep(5000);
            OwnersSelect.Click();
            System.Threading.Thread.Sleep(5000);
            PropertiesSelect.Click();
            ClickingAddNewProperty.Click();
            //Value set for property details page
            PropertyName.SendKeys(ExcelLib.ReadData(2, "Value"));
            SearchAddress.SendKeys(ExcelLib.ReadData(33, "Value"));
            System.Threading.Thread.Sleep(5000);
            //Value set using google api
            var address = Global.Driver.driver.FindElements(By.ClassName("pac-item"))[0];

            address.Click();
            TargetRent.SendKeys(ExcelLib.ReadData(14, "Value"));
            LandArea.SendKeys(ExcelLib.ReadData(10, "Value"));
            BedRooms.SendKeys(ExcelLib.ReadData(11, "Value"));
            CarParks.SendKeys(ExcelLib.ReadData(12, "Value"));
            Description.SendKeys(ExcelLib.ReadData(13, "Value"));
            FloorArea.SendKeys(ExcelLib.ReadData(15, "Value"));
            BathRooms.SendKeys(ExcelLib.ReadData(16, "Value"));
            YearBuilt.SendKeys(ExcelLib.ReadData(9, "Value"));
            imagebox.Click();
            //Image upload
            Global.Driver.driver.FindElement(By.Id("file-upload")).Click();
            System.Threading.Thread.Sleep(10000);
            SendKeys.SendWait("E:\\Document\\house.jpg");
            System.Threading.Thread.Sleep(10000);
            SendKeys.SendWait(@"{Enter}");
            System.Threading.Thread.Sleep(5000);
            NextButton.Click();
            System.Threading.Thread.Sleep(5000);
            //Value set for financial details page
            PurchasePrice.SendKeys(ExcelLib.ReadData(17, "Value"));
            HomeValue.SendKeys(ExcelLib.ReadData(18, "Value"));
            Mortgage.SendKeys(ExcelLib.ReadData(19, "Value"));
            NextButton2.Click();
            //Value set for Tenant details page
            TenantEmail.SendKeys(ExcelLib.ReadData(20, "Value"));
            FirstName.SendKeys(ExcelLib.ReadData(21, "Value"));
            LastName.SendKeys(ExcelLib.ReadData(22, "Value"));
            StartDate.SendKeys(ExcelLib.ReadData(23, "Value"));
            EndDate.SendKeys(ExcelLib.ReadData(24, "Value"));
            RentAmount.SendKeys(ExcelLib.ReadData(25, "Value"));
            PaymentStartDate.SendKeys(ExcelLib.ReadData(26, "Value"));
            Save.Click();
        }
Esempio n. 13
0
        public override string ToString()
        {
            //this method must return a string
            string outputStr = "Street Address: " + Address + "\n"
                               + "Year Built: " + Year + "\n"
                               + "Purchase Price: " + PurchasePrice.ToString("C") + "\n"
                               + "Income From Rent: " + IncomeFromRent.ToString("C") + "\n"
                               + "Monthly Expense: " + MonthlyExpense.ToString("C") + "\n"
                               + "Monthly Earnings: " + MonthlyEarnings.ToString("C");

            return(outputStr);
        }
Esempio n. 14
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = Id.GetHashCode();
         hashCode = (hashCode * 397) ^ (Manufacturer?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Model?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Description?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ PurchasePrice.GetHashCode();
         hashCode = (hashCode * 397) ^ PurchaseDate.GetHashCode();
         return(hashCode);
     }
 }
Esempio n. 15
0
        public void PurchasePriceCtorTest()
        {
            var pp0   = new PurchasePrice();
            var ppDec = new PurchasePrice(75.0m);
            var ppInt = new PurchasePrice(75);

            Assert.AreEqual(pp0.Price, 0);
            Assert.AreEqual(ppDec.Price, 75);
            Assert.AreEqual(ppInt.Price, 75);
            Assert.AreEqual(pp0.PriceDecimal, 0m);
            Assert.AreEqual(ppDec.PriceDecimal, 75m);
            Assert.AreEqual(ppInt.PriceDecimal, 75m);
        }
Esempio n. 16
0
        /// <summary>
        /// Ajoute les données de l'entités dans un dictionnaire pour assurer la correspondance entre attributs et colonnes
        /// </summary>
        /// <returns> Le dictionnaire </returns>
        public Dictionary <string, string> Fetch()
        {
            Dictionary <string, string> res = new Dictionary <string, string>
            {
                { "nom", Name },
                { "designation", Designation },
                { "prix_achat", PurchasePrice.ToString(CultureInfo.CurrentCulture) },
                { "prix_vente", SellPrice.ToString(CultureInfo.CurrentCulture) },
                { "tva", TVA.ToString(CultureInfo.CurrentCulture) },
                { "code_ean", EANCode }
            };

            return(res);
        }
        public VehicleValidator()
        {
            RuleFor(x => x.VIN).Cascade(CascadeMode.StopOnFirstFailure)
            .MaximumLength(100)
            .WithMessage("Maximum length is 100 characters.");
            RuleFor(x => x.Make).Cascade(CascadeMode.StopOnFirstFailure)
            .NotEmpty().WithMessage("Make is required.")
            .MaximumLength(15).WithMessage("Maximum length is 15 characters.");
            RuleFor(x => x.Model).Cascade(CascadeMode.StopOnFirstFailure)
            .NotEmpty().WithMessage("Model is required.")
            .MaximumLength(15).WithMessage("Maximum length is 15 characters.");
            RuleFor(x => x.Trim).Cascade(CascadeMode.StopOnFirstFailure)
            .MaximumLength(10).WithMessage("Maximum length is 10 characters.");
            RuleFor(x => x.Color).Cascade(CascadeMode.StopOnFirstFailure)
            .MaximumLength(15).WithMessage("Maximum length is 15 characters.");


            RuleFor(x => x.Mileage).Cascade(CascadeMode.StopOnFirstFailure)
            .Must(Mileage => Double.TryParse(Mileage, out double result))
            .When(vm => vm.Mileage != null)
            .WithMessage("Mileage must contain only numbers and commas.")
            .Must(Mileage => double.Parse(Mileage) >= 0)
            .When(vm => vm.Mileage != null)
            .WithMessage("Mileage must 0 or greater.");

            //RuleFor(x => x.Year).Cascade(CascadeMode.StopOnFirstFailure)
            //    .NotEmpty().WithMessage("Year is required.")
            //    .Must(Year => int.TryParse(Year, out int result))
            //        .WithMessage("Year must contain only numbers. ")
            //    .GreaterThan("1990").WithMessage("Must be greater than 1990.")
            //    .LessThanOrEqualTo(DateTime.Now.Year.ToString()).WithMessage("Must be current year or earlier.");


            RuleFor(x => x.PurchasePrice).Cascade(CascadeMode.StopOnFirstFailure)
            .NotEmpty().WithMessage("Purchase Price is required.")
            .Must(PurchasePrice => PriceMustBeACurrency(PurchasePrice.ToString()))
            .WithMessage("Purchase price may include only numbers, commas, and decimals.")
            .Must(PurchasePrice => PriceMustBeGreaterThanZero(PurchasePrice.ToString()))
            .WithMessage("Purchase price must be greater than 0.");



            RuleFor(x => x.PurchaseDate).Cascade(CascadeMode.StopOnFirstFailure)
            .NotEmpty().WithMessage("Purchase date is required.")
            .LessThanOrEqualTo(DateTime.Today).WithMessage("Date must be today or earlier.");
            RuleFor(x => x.LotDate).Cascade(CascadeMode.StopOnFirstFailure)
            .NotEmpty().WithMessage("Lot date is required.")
            .GreaterThanOrEqualTo(x => x.PurchaseDate).WithMessage("Date cannot be before purchase date.");
        }
        void AddFinanceDetails()
        {
            ExcelLib.PopulateInCollection(Base.ExcelPath, "FinanceDetails");

            PurchasePrice.SendKeys(ExcelLib.ReadData(2, "PurchasePrice"));
            Mortage.SendKeys(ExcelLib.ReadData(2, "Mortgage"));
            HomeValue.SendKeys(ExcelLib.ReadData(2, "HomeValue"));
            if (owneroccupied == "Yes")
            {
                SaveInFinance.Click();
            }
            else
            {
                NextInfinance.Click();
                AddTenantDetails();
            }
        }
Esempio n. 19
0
 internal void FinDetailsMethod()
 {
     ExcelLib.PopulateInCollection(Base.ExcelPath, "FinancialDetails");
     Driver.wait(2);
     //Verify the title of Webpage
     Assert.IsTrue(Driver.driver.PageSource.Contains("Purchase Price"));
     try
     {
         PurchasePrice.SendKeys(ExcelLib.ReadData(2, "PurchasePrice"));
         decimal d;
         if (decimal.TryParse(ExcelLib.ReadData(2, "PurchasePrice"), out d))
         {
             Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Pass, "Purchase Price field has been filled with integer");
             Mortgage.SendKeys(ExcelLib.ReadData(2, "Mortgage"));
             decimal dM;
             if (decimal.TryParse(ExcelLib.ReadData(2, "Mortgage"), out d))
             {
                 Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Pass, "Purchase Price field has been filled with integer");
                 Homevalue.SendKeys(ExcelLib.ReadData(2, "HomeValue"));
                 Driver.wait(2);
                 if (ClickNext.Enabled)
                 {
                     ClickNext.Click();
                     Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Info, "Method to enter Financial details executed and mandatory fileds verified");
                 }
                 else
                 {
                     Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Fail, "Next button is not enabled");
                 }
             }
             else
             {
                 Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Fail, "Mortgage Field has been not been filled with numeric value");
             }
         }
         else
         {
             Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Fail, "Purchase Price field has not been filled with a numeric character");
         }
     }
     catch (Exception ex)
     {
         string excepMesg = ex.Message;
         Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Fail, "Exception Message:" + excepMesg);
     }
 }
Esempio n. 20
0
        public void FinanceDetails()
        {
            //Enter Purchase Prise value
            PurchasePrice.SendKeys(ExcelLib.ReadData(2, "PurchasePrice"));
            Driver.wait(2000);

            //Enter Mortgage value
            Mortgage.SendKeys(ExcelLib.ReadData(2, "Mortgage"));
            Driver.wait(2000);

            //Enter Home Value
            HomeValue.SendKeys(ExcelLib.ReadData(2, "HomeValue"));
            Driver.wait(2000);

            //Clicking on next button
            NextFinance.Click();
            Thread.Sleep(1000);
        }
        internal void SaveFinanceDetails(int TestDataSet)
        {
            try
            {
                //Enter the testdata into the relevant input fields
                PurchasePrice.SendKeys(ExcelLib.ReadData(TestDataSet, "PurchasePrice"));
                Mortgage.SendKeys(ExcelLib.ReadData(TestDataSet, "Mortgage"));
                HomeValue.SendKeys(ExcelLib.ReadData(TestDataSet, "HomeValue"));
                Thread.Sleep(1000);

                //Click on the Next Button to move to the Tenant Details
                NextButton.Click();
            }
            catch (Exception e)
            {
                Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Error, "Error occured when entering Finance Details for the new property: " + e.Message.ToString());
            }
        }
        //A method to enter and save a given test data set for finance details
        internal bool SaveFinanceDetails(int TestDataSet)
        {
            try
            {
                //Enter the testdata into the relevant input fields
                PurchasePrice.SendKeys(ExcelLib.ReadData(TestDataSet, "PurchasePrice"));
                Mortgage.SendKeys(ExcelLib.ReadData(TestDataSet, "Mortgage"));
                HomeValue.SendKeys(ExcelLib.ReadData(TestDataSet, "HomeValue"));
                Thread.Sleep(1000);

                //Click on the Next Button to move to the Tenant Details
                FinanceNextButton.Click();
                return(true);
            }
            catch (Exception e)
            {
                // Add details of the error into the report
                Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Error, "Error occured when entering Finance Details for the new property: " + e.Message.ToString());
                // Save Screenshot to display the error
                String img = SaveScreenShotClass.SaveScreenshot(Driver.driver, "Exception Report");
                Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Info, "Image example: " + img);
                return(false);
            }
        }
 internal BillingInformation(PurchasePrice billingCurrencyTotalPaidAmount, PurchasePrice billingCurrencyProratedAmount, PurchasePrice billingCurrencyRemainingCommitmentAmount)
 {
     BillingCurrencyTotalPaidAmount           = billingCurrencyTotalPaidAmount;
     BillingCurrencyProratedAmount            = billingCurrencyProratedAmount;
     BillingCurrencyRemainingCommitmentAmount = billingCurrencyRemainingCommitmentAmount;
 }
Esempio n. 24
0
 //This is a constructor
 public PotatoChips(string name, PurchasePrice price) : base(name, price, 120)
 {
 }
Esempio n. 25
0
 //I think this is a constructor of the snack class
 public Snack(string name, PurchasePrice price)
 {
     this.name  = name;
     this.price = price;
 }
Esempio n. 26
0
        /// <summary>
        /// Convert the purchased prod into a string of params for paypal description
        /// </summary>
        /// <returns></returns>
        public string CreatePayPalItemDescriptions(int index)
        {
            string ReturnString = string.Empty;

            string Description = string.Empty;

            ReturnString += String.Format("&L_PAYMENTREQUEST_0_NAME{0}={1}", index, Uri.EscapeDataString(Name));

            if (SelectedCheckoutProperties != null && SelectedCheckoutProperties.Count > 0)
            {
                for (int myIndex = 0; myIndex < SelectedCheckoutProperties.Count; myIndex++)
                {
                    CheckoutPropertySettingKey SelectedProp = SelectedCheckoutProperties[myIndex];

                    Description += SelectedProp.Key + ": " + SelectedProp.Value;

                    if (myIndex != SelectedCheckoutProperties.Count - 1)
                    {
                        Description += ", ";
                    }
                }
            }

            ReturnString += String.Format("&L_PAYMENTREQUEST_0_DESC{0}={1}", index, Description);
            ReturnString += String.Format("&L_PAYMENTREQUEST_0_AMT{0}={1}", index, Uri.EscapeDataString(PurchasePrice.ToString("0.00")));
            ReturnString += String.Format("&L_PAYMENTREQUEST_0_QTY{0}={1}", index, Uri.EscapeDataString(Quantity.ToString()));

            return(ReturnString);
        }
 //This is a constructor
 public Banana(string name, PurchasePrice price) : base(name, price, DateTime.Now.AddDays(7))
 {
 }
Esempio n. 28
0
 public JunkFood(string name, PurchasePrice price, int CaloriesFromFat)
     : base(name, price)
 {
     this.CaloriesFromFat = CaloriesFromFat;
 }
 private bool Equals(Stock other)
 {
     return(string.Equals(Ticker, other.Ticker, StringComparison.InvariantCultureIgnoreCase) && Shares.Equals(other.Shares) && PurchasePrice.Equals(other.PurchasePrice) && string.Equals(PurchaseDate, other.PurchaseDate, StringComparison.InvariantCultureIgnoreCase));
 }
Esempio n. 30
0
 //This is a constructor
 public CandyBar(string name, PurchasePrice price) : base(name, price, 160)
 {
 }