Inheritance: DefaultsViewModelBase
Beispiel #1
0
		public PaymentPage(Judo judo, PaymentDefaultsViewModel defaults) : base(judo, defaults)
		{
			if (!Judo.AmexAccepted)
			{
				SetAmexAsUnaccepted();
			}

			if (!Judo.MaestroAccepted)
			{
				SetMaestroAsUnaccepted();
			}
		}
		public CardEntryPage(Judo judo, PaymentDefaultsViewModel defaults) : this(judo)
		{
			SetUpDefaults(defaults);
		}
		void SetUpDefaults(PaymentDefaultsViewModel defaults)
		{
			//Set defaults.
			cardNumberEntry.Text = defaults.CardNumber;
			cardNumberEntry.ShouldImageOpacityBeApplied = !string.IsNullOrWhiteSpace(defaults.CardNumber);
			expiryDateEntry.Text = defaults.ExpiryDate;
			startDateEntry.Text = defaults.StartDate;
			issueNumberEntry.Text = defaults.IssueNumber;
			UpdateCardIcons();
		}