public LoanDetailsViewModel(IEMIService emiService, IShareService shareService) { this.emiService = emiService; this.shareService = shareService; //Command intialization CalculatePaymentCommand = new Command(Calculate); ResetValuesCommand = new Command(ResetFields); PaymentStartMonth = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day); //Collection intialization TotalPaymentCollection = new ObservableCollection <ChartDataPoint>() { new ChartDataPoint("Principal", 1) }; }
public StatisticPageViewModel(IEMIService emiService, IExportDataService exportService) { pickerSelectedItem = new ObservableCollection <object>(); exportDataService = exportService; this.emiService = emiService; ExportStatisticsCommand = new Command <SfDataGrid>(ExportStatisticsData); ShowHidePickerDialog = new Command(() => { PickerVisiblity = !PickerVisiblity; }); PaymentDateSelectionCommand = new Command(PaymentStartDateChanged); paymentStartDate = CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(PaymentStartMonth.Month).Substring(0, 3); paymentStartDate += " " + PaymentStartMonth.Year.ToString(); pickerSelectedItem.Add(CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(PaymentStartMonth.Month).Substring(0, 3)); pickerSelectedItem.Add(PaymentStartMonth.Year.ToString()); }