Пример #1
0
 private void Current_TrainingDaysRetrieved(object sender, DateEventArgs e)
 {
     ApplicationState.Current.TrainingDaysRetrieved -= Current_TrainingDaysRetrieved;
     fillCalendarData(e.Date, ApplicationState.Current.CurrentBrowsingTrainingDays.TrainingDays);
     progressBar.ShowProgress(false);
     mainCalendar.IsHitTestVisible = true;
 }
    protected virtual void OnDateSelected(DateEventArgs e)
    {
        EventHandler <DateEventArgs> handler = DateSelected;

        if (handler != null)
        {
            handler(this, e);
        }
    }
Пример #3
0
 private void Current_TrainingDaysRetrieved(object sender, DateEventArgs e)
 {
     ApplicationState.Current.TrainingDaysRetrieved -= Current_TrainingDaysRetrieved;
     progressBar.ShowProgress(false);
     IsHitTestVisible = true;
     if (isNextPending)
     {
         showNext();
     }
     else
     {
         showPrevious();
     }
 }
Пример #4
0
 private void DcIncomes_DateChanged(object sender, DateEventArgs e)
 {
     if (e.Date != null)
     {
         if (e.Month > 0 && e.Year > 0)
         {
             vm.AllIncomes = new ObservableCollection <Income>(vm.AllIncomesShadow.Where(i => i.Date.Month == e.Month && i.Date.Year
                                                                                         == e.Year));
         }
         else if (e.Year > 0 && e.Month < 1)
         {
             vm.AllIncomes = new ObservableCollection <Income>(vm.AllIncomesShadow.Where(i => i.Date.Year
                                                                                         == e.Year));
         }
         else if (e.Month > 0 && e.Year < 1)
         {
             vm.AllIncomes = new ObservableCollection <Income>(vm.AllIncomesShadow.Where(i => i.Date.Month == e.Month));
         }
     }
     else
     {
         vm.AllIncomes = new ObservableCollection <Income>(vm.AllIncomesShadow);
     }
 }
Пример #5
0
 private void monthCalendar_DateClicked(object sender, DateEventArgs e)
 {
     Main.Current.ClickCalendar(e.Date);
 }
Пример #6
0
        private async void DcInvoice_DateChanged(object sender, DateEventArgs e)
        {
            if (vm.InvoiceFor == "Clients")
            {
                if (e.Month > 0 && e.Year > 0)
                {
                    vm.Invoices = new ObservableCollection <ClientInvoice>(((ObservableCollection <ClientInvoice>)vm.InvoicesShadow).Where(i => i.Date.Month == e.Month && i.Date.Year
                                                                                                                                           == e.Year));
                }
                else if (e.Year > 0 && e.Month < 1)
                {
                    vm.Invoices = new ObservableCollection <ClientInvoice>(((ObservableCollection <ClientInvoice>)vm.InvoicesShadow).Where(i => i.Date.Year
                                                                                                                                           == e.Year));
                }
                else if (e.Month > 0 && e.Year < 1)
                {
                    vm.Invoices = new ObservableCollection <ClientInvoice>(((ObservableCollection <ClientInvoice>)vm.InvoicesShadow).Where(i => i.Date.Month == e.Month));
                }
                else
                {
                    vm.Invoices = new ObservableCollection <ClientInvoice>(((ObservableCollection <ClientInvoice>)vm.InvoicesShadow));
                }


                await SetTotals <ClientInvoice>(vm.Invoices);

                currentContext.Post(_ =>
                {
                    DcInvoice.TotalAmount   = TotalAmount.ToString();
                    DcInvoice.TotalVatValue = TotalVatValue.ToString();
                }, null);
            }
            else
            {
                if (e.Month > 0 && e.Year > 0)
                {
                    vm.Invoices = new ObservableCollection <SupplierInvoice>(((ObservableCollection <SupplierInvoice>)vm.InvoicesShadow).Where(i => i.Date.Month == e.Month && i.Date.Year
                                                                                                                                               == e.Year));
                }
                else if (e.Year > 0 && e.Month < 1)
                {
                    vm.Invoices = new ObservableCollection <SupplierInvoice>(((ObservableCollection <SupplierInvoice>)vm.InvoicesShadow).Where(i => i.Date.Year
                                                                                                                                               == e.Year));
                }
                else if (e.Month > 0 && e.Year < 1)
                {
                    vm.Invoices = new ObservableCollection <SupplierInvoice>(((ObservableCollection <SupplierInvoice>)vm.InvoicesShadow).Where(i => i.Date.Month == e.Month));
                }
                else
                {
                    vm.Invoices = new ObservableCollection <SupplierInvoice>(((ObservableCollection <SupplierInvoice>)vm.InvoicesShadow));
                }

                await SetTotals <SupplierInvoice>(vm.Invoices);

                currentContext.Post(_ =>
                {
                    DcInvoice.TotalAmount   = TotalAmount.ToString();
                    DcInvoice.TotalVatValue = TotalVatValue.ToString();
                }, null);
            }
        }
 static void f1_DateSelected(object sender, DateEventArgs e)
 {
     f2.SelectedDate = e.Date.AddMonths(6);
 }
    void dtp_ValueChanged(object sender, EventArgs e)
    {
        DateEventArgs dea = new DateEventArgs(dtp.Value.Date);

        OnDateSelected(dea);
    }
Пример #9
0
		private void EventOnPopupChange (object sender, DateEventArgs args)
		{
			Date = args.Date;
		}
Пример #10
0
 private void EventOnPopupChange(object sender, DateEventArgs args)
 {
     Date = args.Date;
 }
Пример #11
0
 private void OnPopupDateChanged( object sender, DateEventArgs args)
 {
     CurrentDate = args.Date;
 }
Пример #12
0
        private async void DcQutations_DateChanged(object sender, DateEventArgs e)
        {
            try
            {
                //check if the selected date is null and return all Quotations
                if (e.Date != null)
                {
                    //check if the demanded quotations if for all
                    if (QuoteFor == "All")
                    {
                        if (e.Month > 0 && e.Year > 0)
                        {
                            vm.ReportedQuotation = new ObservableCollection <Quotation>(vm.allQuotations.Where(i => i.QuoteDate.Month == e.Month && i.QuoteDate.Year
                                                                                                               == e.Year));
                        }
                        else if (e.Year > 0 && e.Month < 1)
                        {
                            vm.ReportedQuotation = new ObservableCollection <Quotation>(vm.allQuotations.Where(i => i.QuoteDate.Year
                                                                                                               == e.Year));
                        }
                        else if (e.Month > 0 && e.Year < 1)
                        {
                            vm.ReportedQuotation = new ObservableCollection <Quotation>(vm.allQuotations.Where(i => i.QuoteDate.Month == e.Month));
                        }
                    }

                    else
                    {
                        if (e.Month > 0 && e.Year > 0)
                        {
                            vm.ReportedQuotation = new ObservableCollection <Quotation>(vm.ClientQuotation.Where(i => i.QuoteDate.Month == e.Month && i.QuoteDate.Year
                                                                                                                 == e.Year));
                        }
                        else if (e.Year > 0 && e.Month < 1)
                        {
                            vm.ReportedQuotation = new ObservableCollection <Quotation>(vm.ClientQuotation.Where(i => i.QuoteDate.Year
                                                                                                                 == e.Year));
                        }
                        else if (e.Month > 0 && e.Year < 1)
                        {
                            vm.ReportedQuotation = new ObservableCollection <Quotation>(vm.ClientQuotation.Where(i => i.QuoteDate.Month == e.Month));
                        }
                    }
                }
                else
                {
                    if (QuoteFor == "All")
                    {
                        vm.ReportedQuotation = new ObservableCollection <Quotation>(vm.allQuotations);
                    }
                    else
                    {
                        vm.ReportedQuotation = new ObservableCollection <Quotation>(vm.ClientQuotation);
                    }
                }

                await SetTotals <Quotation>(vm.ReportedQuotation);

                currentContext.Post(_ =>
                {
                    DcQutations.TotalAmount   = TotalAmount.ToString();
                    DcQutations.TotalVatValue = TotalVatValue.ToString();
                }, null);
            }
            catch { }
        }