async private void DatePicker_DateChanged(object sender, DatePickerValueChangedEventArgs e)
        {
            clearAllCollections();
            prog.IsIndeterminate = true;
            App.startRange       = startRangeDateTimePicker.Date.Date;
            App.endRange         = endRangeDateTimePicker.Date.Date;

            // get user events.
            String error = await App.commonApiHandler.QueryForUserEvents();


            // QueryForEventsWithinAnArea
            error = await App.commonApiHandler.QueryForEventsWithinAnArea(App.offset, DateTimeConverter.DateTimeToUnixTimestamp(startRangeDateTimePicker.Date.Date),
                                                                          DateTimeConverter.DateTimeToUnixTimestamp(endRangeDateTimePicker.Date.Date));

            if (error != null)
            {
                dialog.Content = error;
                _locationIcon100m.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
                try
                {
                    await dialog.ShowAsync();
                }
                catch (Exception) { }
            }
            prog.IsIndeterminate = false;
        }
Exemplo n.º 2
0
        private void OnDOBSelected(object sender, DatePickerValueChangedEventArgs e)
        {
            DatePicker date      = sender as DatePicker;
            var        selection = date.Date.Date;

            Profile.DOB = selection;
        }
Exemplo n.º 3
0
 /// <summary>
 /// Reloads data if a different date is selected.
 /// </summary>
 private void DateChange(object sender, DatePickerValueChangedEventArgs e)
 {
     NoteBox.Text = "";
     loadChange();
     DefectListSetup();
     LightLeds();
 }
Exemplo n.º 4
0
        /// <summary>
        /// This is the handler for the DateChanged event.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void datePicker_DateChanged(object sender, DatePickerValueChangedEventArgs e)
        {
            // The DateTimeFormatter class formats dates and times with the user's default settings
            DateTimeFormatter dateFormatter = new DateTimeFormatter("shortdate");

            rootPage.NotifyUser("Date changed to " + dateFormatter.Format(e.NewDate), NotifyType.StatusMessage);
        }
 private void dpkLoanDate_DateChanged(object sender, DatePickerValueChangedEventArgs e)
 {
     if (e.NewDate <= DateTimeOffset.Now)
     {
         dpkLoanDate.Date = DateTimeOffset.Now.AddDays(1);
     }
 }
Exemplo n.º 6
0
 private void UserInfo_DateOfBirth_OnDateChanged(object sender, DatePickerValueChangedEventArgs e)
 {
     if (ActiveUser == DisplayUser)
     {
         DisplayUser.DateOfBirth = UserInfo_DateOfBirth.Date.UtcDateTime;
     }
 }
 private void event_DateChanged(object sender, DatePickerValueChangedEventArgs e)
 {
     if (event_Date.Date > DateTimeOffset.Now)
     {
         event_Date.Date = DateTime.Now;
     }
 }
Exemplo n.º 8
0
        private void Date_DateChanged(object sender, DatePickerValueChangedEventArgs e)
        {
            if (DateTime.Compare(new DateTime(Date.Date.Year, Date.Date.Month, Date.Date.Day), new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day)) > 0)
            {
                Date.Date = lastdate;
                return;
            }
            create = true;
            string date = "%" + Date.Date.Year.ToString() + '/' + Date.Date.Month.ToString() + '/' + Date.Date.Day.ToString() + "%";

            using (var statement = App.conn.Prepare("select * from Items WHERE Date LIKE ?"))
            {
                statement.Bind(1, date);
                while (statement.Step() != SQLiteResult.DONE)
                {
                    ID                 = int.Parse(statement[0].ToString());
                    title.Text         = statement[1].ToString();
                    detail.Text        = statement[2].ToString();
                    Tags.SelectedValue = statement[3].ToString();
                    create             = false;
                }
            }
            if (create)
            {
                title.Text         = "";
                detail.Text        = "";
                Tags.SelectedIndex = 0;
            }
        }
 private void dpkDateVerified_DateChanged(object sender, DatePickerValueChangedEventArgs e)
 {
     if (e.NewDate > DateTimeOffset.Now)
     {
         dpkDateVerified.Date = DateTimeOffset.Now.AddDays(-1);
     }
 }
        private void DatePicker_OnDateChanged(object sender, DatePickerValueChangedEventArgs e)
        {
            DateTimeOffset addedDate = ManagerDatePicker.Date;
            Event          aD        = new Event(addedDate);

            _collectionEventSingleton.AddEventDate(aD);
        }
Exemplo n.º 11
0
        private async void DatePicker_DateChanged(object sender, DatePickerValueChangedEventArgs e)
        {
            var newlyAddedPeriodStartDate = e.NewDate;

            var mediaElement = new MediaElement();
            var synth        = new SpeechSynthesizer();
            var message      = "Please, choose period starting date";

            if (newlyAddedPeriodStartDate != new DateTimeOffset(DateTime.MinValue, TimeSpan.Zero))
            {
                message = $"You set your period to start from { newlyAddedPeriodStartDate.ToString("D", CultureInfo.InvariantCulture) }";
                periodsData.Add(new PeriodInfoItem
                {
                    periodStartDateValue         = newlyAddedPeriodStartDate,
                    periodStartDateValueToString = newlyAddedPeriodStartDate.ToString("D", CultureInfo.InvariantCulture),
                    periodEndDateValue           = newlyAddedPeriodStartDate.AddDays(5),
                    periodEndDateValueToString   = newlyAddedPeriodStartDate.AddDays(5).ToString("D", CultureInfo.InvariantCulture)
                });
            }

            var stream = await synth.SynthesizeTextToStreamAsync(message);

            mediaElement.SetSource(stream, stream.ContentType);
            mediaElement.Play();
        }
Exemplo n.º 12
0
 private void dpDate_DateChanged(object sender, DatePickerValueChangedEventArgs e)
 {
     if (dpDate.Date > DateTime.Today)
     {
         dpDate.Date = DateTime.Today;
     }
 }
Exemplo n.º 13
0
        /// <summary>
        /// This is the handler for the DateChanged event.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void datePicker_DateChanged(object sender, DatePickerValueChangedEventArgs e)
        {
            // The DateTimeFormatter class formats dates and times with the user's default settings
            DateTimeFormatter dateFormatter = new DateTimeFormatter("shortdate");

            rootPage.NotifyUser("Date changed to " + dateFormatter.Format(e.NewDate), NotifyType.StatusMessage);
        }
Exemplo n.º 14
0
        private async void HistoryDatePicker_DateChanged(object sender, DatePickerValueChangedEventArgs e)
        {
            if (HistoryDatePicker.Date > DateTime.Now)
            {
                HistoryDatePicker.Date  = DateTime.Now;
                NextDayButton.IsEnabled = false;
                return;
            }
            else if (HistoryDatePicker.Date < (DateTime.Now.AddDays(-8)))
            {
                HistoryDatePicker.Date  = DateTime.Now.AddDays(-7);
                PrevDayButton.IsEnabled = false;
                return;
            }
            else
            {
                PrevDayButton.IsEnabled = true;
                NextDayButton.IsEnabled = true;
            }
            //remove all current polylines on map
            this.InputMap.MapElements.Clear();
            await GetSelectedDatePhotoPoints();

            await this.ResetViewAsync();
        }
Exemplo n.º 15
0
        private async void DatePicker_DateChanged(object sender, DatePickerValueChangedEventArgs e)
        {
            try
            {
                string s = await DataSource.GetLive(cboDatum.Date.ToString("yyyy-MM-dd"));

                pring1.IsActive = true;
                var j = JsonConvert.DeserializeObject <List <Matcher> >(s);
                /*Kollar tidszon för att omvandla till lokaltid*/
                foreach (var item in j)
                {
                    Matcher m        = new Matcher();
                    string  startTid = GetLocalDateTime(DateTime.Parse(item.Date.ToString()));
                    item.Date = startTid; //.Substring(10, 10);
                }
                /*S**t tidszon*/
                var MyGroupedResults = j.ToGroups(x => x.HomeTeam, x => x.League);
                jumplist.ReleaseItemsSource();
                itemListLive.ItemsSource = MyGroupedResults;
                jumplist.ApplyItemsSource();
                itemListLive.SelectedIndex = ListIndex.Position;
                itemListLive.UpdateLayout();
                itemListLive.ScrollIntoView(itemListLive.SelectedItem);
                pring1.IsActive = false;
            }
            catch
            {
                pring1.IsActive = false;
            }
        }
Exemplo n.º 16
0
 private void check_data(object sender, DatePickerValueChangedEventArgs e)
 {
     /* if (date.Date < DateTime.Today)
      * {
      *  var messagedialog = new MessageDialog("date is not correct").ShowAsync();
      * }*/
 }
        private void DateChanged(object sender, DatePickerValueChangedEventArgs e)
        {
            double days = (dpEnd.Date - dpStart.Date).TotalDays;

            price        = 100 * ((int)days);
            tbPrice.Text = "Price: " + price + " EUR";
        }
Exemplo n.º 18
0
 private void date_DateChanged(object sender, DatePickerValueChangedEventArgs e)
 {
     if (checkDateChanged)
     {
         checkComboBoxChanged = false;
         DateTimeOffset selectedDate = date.Date;
         TimeSpan       span         = selectedDate.Date - DateTimeOffset.Now.Date;
         if (selectedDate.Date > DateTimeOffset.Now.Date)
         {
             checkComboBox.SelectedIndex = 1;
             string newText = span.Days.ToString();
             daysTextBox.Text = newText;
         }
         else if (selectedDate.Date < DateTimeOffset.Now.Date)
         {
             checkComboBox.SelectedIndex = 0;
             string newText = span.Negate().Days.ToString();
             daysTextBox.Text = newText;
         }
         else
         {
             daysTextBox.Text = "0";
         }
     }
     else
     {
         checkDateChanged = true;
     }
 }
Exemplo n.º 19
0
 private void BeginDate_DateChanged(object sender, DatePickerValueChangedEventArgs e)
 {
     if (BeginDate.Date < DateTimeOffset.Now)
     {
         FlyoutBase.ShowAttachedFlyout((FrameworkElement)sender);
     }
 }
Exemplo n.º 20
0
        private void DatePicker_SecondDateChanged(object sender, DatePickerValueChangedEventArgs e)
        {
            secondDate = secondDatePicker.Date;
            daysUntil = (int)((secondDate - firstDate).TotalDays);

            resultDate.Text = daysUntil.ToString();
        }
Exemplo n.º 21
0
 /// <summary>
 /// Se ejecuta cada vez que se altere la fecha del DatePicker
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void esMiCumpleanos(object sender, DatePickerValueChangedEventArgs e)
 {
     //Solo irá a esa página en caso de que la fecha sea igual a la de mi cumpleaños :D
     if (dp.Date.Date.CompareTo(new DateTime(1999, 8, 12)) == 0)
     {
         this.Frame.Navigate(typeof(Pagina3));
     }
 }
Exemplo n.º 22
0
 private void EndDate_DateChanged(object sender, DatePickerValueChangedEventArgs e)
 {
     if (EndDate.Date < BeginDate.Date)
     {
         //FlyoutBase.ShowAttachedFlyout((FrameworkElement)sender);
         //等于有问题
     }
 }
Exemplo n.º 23
0
 private void UnderPicker_DateChanged(object sender, DatePickerValueChangedEventArgs e)
 {
     if (e.NewDate == this.Date)
     {
         return;
     }
     this.Date = e.NewDate;
 }
Exemplo n.º 24
0
 private void StartDate_DateChanged(object sender, DatePickerValueChangedEventArgs e)
 {
     if (CrntDate.Date < StartDate.Date) //If user enters a future date
     {
         StartDate.Date = DateTime.Now;
     }
     PerformCalculation();
 }
Exemplo n.º 25
0
        private void datePickerTar_DateChangeds(object sender, DatePickerValueChangedEventArgs e)
        {
            switch ((sender as DatePicker).Tag)
            {
            case "1": Settings.setValueByKey("DATEPICKERSTART", Convert.ToString(datePickerStart.Date.DateTime)); break;

            case "2": Settings.setValueByKey("DATEPICKEREND", Convert.ToString(datePickerEnd.Date.DateTime)); break;
            }
        }
Exemplo n.º 26
0
        private void DatePicker_OnDateChanged(object sender, DatePickerValueChangedEventArgs e)
        {
            var pick = sender as DatePicker;

            if (pick != null)
            {
                Date = pick.Date;
            }
        }
        /// <summary>
        /// Date changed update handler.
        /// </summary>
        /// <param name="sender">The event sender.</param>
        /// <param name="e">The event.</param>
        private void OnDateChanged(object sender, DatePickerValueChangedEventArgs e)
        {
            var      datePicker = (Windows.UI.Xaml.Controls.DatePicker)sender;
            DateTime newDate    = e.NewDate.DateTime;

            datePicker.GetReactContext().GetNativeModule <UIManagerModule>()
            .EventDispatcher
            .DispatchEvent(new ReactDatePickerEvent(datePicker.GetTag(), newDate));
        }
Exemplo n.º 28
0
        private void mouthPicker_DateChanged(object sender, DatePickerValueChangedEventArgs e)
        {
            DateTimeOffset DT = new DateTimeOffset();

            DT    = mouthPicker.Date.Date;
            year  = DT.Year;
            mouth = DT.Month;
            Display();
        }
Exemplo n.º 29
0
        private void DatePicker_DateChanged(object sender, DatePickerValueChangedEventArgs e)
        {
            var d = (sender as DatePicker);

            AuWeather.LunarCalendar.CalendarInfo calendar = new AuWeather.LunarCalendar.CalendarInfo(d.Date.Date);
            LunarText.Text = ("农历 " + calendar.LunarYearSexagenary + "年" + calendar.LunarMonthText + "月" + calendar.LunarDayText + "    " + calendar.SolarTermStr).Trim();
            StarText.Text  = calendar.SolarConstellation;
            StoneText.Text = calendar.SolarBirthStone;
        }
Exemplo n.º 30
0
        private async void OnEndDatePickerChanged(object sender, DatePickerValueChangedEventArgs e)
        {
            if (e.NewDate < StartDatePicker.Date)
            {
                EndDatePicker.Date = StartDatePicker.Date;
            }

            EndDate = EndDatePicker.Date.AddDays(1).DateTime;
            await UpdateData();
        }
Exemplo n.º 31
0
        private async void OnStartDatePickerChanged(object sender, DatePickerValueChangedEventArgs e)
        {
            if (e.NewDate > EndDatePicker.Date)
            {
                StartDatePicker.Date = EndDatePicker.Date;
            }

            StartDate = StartDatePicker.Date.DateTime;
            await UpdateData();
        }
Exemplo n.º 32
0
        private async void dpDate_DateChanged(object sender, DatePickerValueChangedEventArgs e)
        {
            if (dpDate.Date > DateTime.Today)
            {
                MessageDialog dateMsg = new MessageDialog("The date cannot be later than today");
                await dateMsg.ShowAsync();

                dpDate.Date = DateTime.Today;
            }
        }
Exemplo n.º 33
0
 private void datepicker_DateChanged(object sender, DatePickerValueChangedEventArgs args)
 {
     date.Text = "你选择的日期是:" + datepicker.Date.ToString("yyyy-M-d");
 }
 private void DeliveryDatePicker_DateChanged(object sender, DatePickerValueChangedEventArgs e)
 {
     if (e.NewDate >= DateTimeOffset.Now)
     {
         _meal.DeliveryDate = e.NewDate;
     }
 }
 private void DtpViewingMonth_DateChanged(object sender, DatePickerValueChangedEventArgs e)
 {
 }
Exemplo n.º 36
0
 //时间选择器改变的时间
     private void date_DateChanged(object sender, DatePickerValueChangedEventArgs e)
     {
         info.Text = "时间改变为:" + time.Time.ToString() + "日期:" + date.Date.ToString();
     }
 private void StartDatePicker_DateChanged(object sender, DatePickerValueChangedEventArgs e)
 {
     _oriStartTime = StartDateTime;
     StartDateTime = e.NewDate.DateTime;
 }
Exemplo n.º 38
0
 private void startDatePicker_DateChanged(object sender, DatePickerValueChangedEventArgs e)
 { }
Exemplo n.º 39
0
        private async void HistoryDatePicker_DateChanged(object sender, DatePickerValueChangedEventArgs e)
        {
            if (HistoryDatePicker.Date > DateTime.Now)
            {
                HistoryDatePicker.Date = DateTime.Now;
                NextDayButton.IsEnabled = false;
                return;
            }
            else if (HistoryDatePicker.Date < (DateTime.Now.AddDays(-8)))
            {
                HistoryDatePicker.Date = DateTime.Now.AddDays(-7);
                PrevDayButton.IsEnabled = false;
                return;
            }
            else
            {
                PrevDayButton.IsEnabled = true;
                NextDayButton.IsEnabled = true;
            }
            //remove all current polylines on map
            this.InputMap.MapElements.Clear();
            await GetSelectedDatePhotoPoints();
            await this.ResetViewAsync();

        }
Exemplo n.º 40
0
 private void Date2_DateChanged(object sender, DatePickerValueChangedEventArgs e)
 {
     DateTimeOffset sourcedate = Date2.Date;
     TimeSpan ts = Time.Time;
     tempDate = sourcedate.Date + ts;
 }
Exemplo n.º 41
0
 private void DatePicker_DateChanged(object sender, DatePickerValueChangedEventArgs e)
 {
     this.CheckIfTodoIsEdited();
 }
        private async void DueDate_Changed(object sender, DatePickerValueChangedEventArgs e)
        {
            var newDate = e.NewDate;
            if (ViewModel.Tasks.DueDate == null)
            {
                ViewModel.ChangeDueDate(newDate.DateTime.Date);

                ChangeRemindCmbSelectionToDefault();
                return;
            }
            if (newDate == null || newDate < DateTime.Now.Date || e.NewDate.DateTime.Date.Equals(ViewModel.Tasks.DueDate.Value.ToLocalTime().Date))
            {
                //最好提示用户时间早于当前
                //await MessageDialogHelper.MessageDialogShowAsync("日期不得小于当前日期", "截止日期");
                //(sender as DatePicker).Date = e.OldDate;
                return;
            }

            ViewModel.ChangeDueDate(newDate.DateTime.Date);// TODO Utc时间

            ChangeRemindCmbSelectionToDefault();
        }
Exemplo n.º 43
0
        private async void HistoryDatePicker_DateChanged(object sender, DatePickerValueChangedEventArgs e)
        {
            HistoryDatePicker.IsHitTestVisible = false;
            HistoryDatePicker.Opacity = 0.5;

            var hasData = await GetPinsForGivenDate();

            if (App.PageName.Equals("Start Trip"))
            {
                if (this.ViewModel.CheckedLocations.Count > 0)
                {
                    oldPin = this.ViewModel.CheckedLocations[0];
                    oldPin.IsSelected = true;
                    selectedImage.Source = await PhotoHelper.getImageSource(this.ViewModel.CheckedLocations[0].Photo.ImageName);
                }
                else if (this.ViewModel.PinnedLocations.Count > 0)
                {
                    oldPin = this.ViewModel.PinnedLocations[0];
                }
                else
                {
                    oldPin = new LocationPin
                    {
                        DateCreated = HistoryDatePicker.Date,
                    };
                }
            }
            else if (App.PageName.Equals("End Trip"))
            {
                if (this.ViewModel.CheckedLocations.Count > 0)
                {
                    oldPin = this.ViewModel.CheckedLocations[this.ViewModel.CheckedLocations.Count - 1];
                    oldPin.IsSelected = true;
                    selectedImage.Source = await PhotoHelper.getImageSource(this.ViewModel.CheckedLocations[this.ViewModel.CheckedLocations.Count - 1].Photo.ImageName);
                }
                else if (this.ViewModel.PinnedLocations.Count > 0)
                {
                    oldPin = this.ViewModel.PinnedLocations[this.ViewModel.PinnedLocations.Count - 1];
                }
                else
                {
                    oldPin = new LocationPin
                    {
                        DateCreated = HistoryDatePicker.Date,
                    };
                }
            }

            HistoryDatePicker.IsHitTestVisible = true;
            HistoryDatePicker.Opacity = 1;
        }
 private void EndDatePicker_DateChanged(object sender, DatePickerValueChangedEventArgs e)
 {
     _oriEndTime = EndDateTime;
     EndDateTime = e.NewDate.DateTime;
 }
Exemplo n.º 45
0
 private void DatePicker_DateChanged(object sender, DatePickerValueChangedEventArgs e)
 {
     var d = (sender as DatePicker);
     AuWeather.LunarCalendar.CalendarInfo calendar = new AuWeather.LunarCalendar.CalendarInfo(d.Date.Date);
     LunarText.Text = ("农历 " + calendar.LunarYearSexagenary + "年" + calendar.LunarMonthText + "月" + calendar.LunarDayText + "    " + calendar.SolarTermStr).Trim();
     StarText.Text = calendar.SolarConstellation;
     StoneText.Text = calendar.SolarBirthStone;
 }
Exemplo n.º 46
0
        // Date Changed
        private void datePicker_DateChanged(object sender, DatePickerValueChangedEventArgs e)
        {
            if(datePicker.Date > TodayDate)
            {
                datePicker.Date = TodayDate;
            }

            Party = "";
            Amount = "";
            enterPartyTextBox.Text = "";
            enterAmountTextBox.Text = "";
            spentOrReceivedToggleSwitch.IsOn = false;

            Modify_RemovePanel.Visibility = Visibility.Collapsed;
            addButton.Visibility = Visibility.Visible;

            InSpentList = false;
            InReceivedList = false;

            moneySpentListView.SelectedIndex = -1;
            moneyReceivedListView.SelectedIndex = -1;

            LoadFiles();
        }
Exemplo n.º 47
0
        private void birthdate_DateChanged(object sender, DatePickerValueChangedEventArgs e)
        {

        }
Exemplo n.º 48
0
 private void dtPicker_DateChanged(object sender, DatePickerValueChangedEventArgs e)
 {
     updateText();
 }
Exemplo n.º 49
0
        private async void dpFecha_DateChanged(object sender, DatePickerValueChangedEventArgs e)
        {
            
            
            

            if (comboBoxIdDispositivo.SelectedItem != null)  //Comprobar que el ComboBox Id dispositivo sea diferente de nulo 
            {
                DateTime date = dpFecha.Date.DateTime;
                object selectedItemDispositivo = comboBoxIdDispositivo.SelectedValue.ToString();
                string idDispositivo = selectedItemDispositivo.ToString();
                GridDetalles.Visibility = Visibility.Collapsed;
                // index 0 en comboboxEstado = atendido, Index 1 en comboboxEstado = No atendido
                // index 0 en comboboxIdDispositivo = Refrigerador, Index 1 en comboboxIdDispositivo = Deshidratadora
                if (comboBoxEstado.SelectedIndex == 0 && comboBoxDispositivo.SelectedIndex == 0) 
                {
                    //Index de comboboxEstado esta en 0 y es Atendido 
                    //Se selecciono Refrigerador en combobox dispositivo 
                    try
                    {
                        //En la base de datos un 1 representa Atendido y un 0 Representa a No Atendido 
                        ProgressBarBefore();
                        fallaRefri = await FallaTableRefri
                            .Where(Falla => Falla.idRefrigerador == idDispositivo && Falla.Atendido == "1" && Falla.Fecha == date.ToString("yyyy-MM-dd"))
                            .ToCollectionAsync();
                        if (fallaRefri.Count >= 1)
                        {
                            listView.ItemsSource = fallaRefri;
                            ProgressBarAfter();
                            listView.Visibility = Visibility.Visible;
                        }
                        else
                        {
                            MessageDialog mensaje = new MessageDialog("No existe registro para esta fecha", "No existe registro");
                            await mensaje.ShowAsync();
                            listView.Visibility = Visibility.Collapsed;
                            ProgressBarAfter();

                        }
                    }
                    catch (MobileServiceInvalidOperationException ex)
                    {
                        exception = ex;
                    }

                    if (exception != null)
                    {
                        await new MessageDialog(exception.Message, "Error al cargar!").ShowAsync();
                    }


                }
                else if(comboBoxEstado.SelectedIndex == 1 && comboBoxDispositivo.SelectedIndex == 0)
                {
                    //Index de comboboxEstado esta en 1 y es No Atendido 
                    //Se selecciono Refrigerador en combobox dispositivo
                    try
                    {
                        //En la base de datos un 1 representa Atendido y un 0 Representa a No Atendido 
                        ProgressBarBefore();
                        fallaRefri = await FallaTableRefri
                            .Where(Falla => Falla.idRefrigerador == idDispositivo && Falla.Atendido == "0" && Falla.Fecha == date.ToString("yyyy-MM-dd"))
                            .ToCollectionAsync();
                        if (fallaRefri.Count >= 1)
                        {
                            listView.ItemsSource = fallaRefri;
                            ProgressBarAfter();
                            listView.Visibility = Visibility.Visible;
                        }
                        else
                        {
                            MessageDialog mensaje = new MessageDialog("No existe registro para esta fecha", "No existe registro");
                            await mensaje.ShowAsync();
                            listView.Visibility = Visibility.Collapsed;
                            ProgressBarAfter();

                        }
                    }
                    catch (MobileServiceInvalidOperationException ex)
                    {
                        exception = ex;
                    }

                    if (exception != null)
                    {
                        await new MessageDialog(exception.Message, "Error al cargar!").ShowAsync();
                    }

                }else if(comboBoxEstado.SelectedIndex == 0 && comboBoxDispositivo.SelectedIndex == 1)
                {
                    //Index de comboboxEstado esta en 0 y es Atendido 
                    //Se selecciono Deshidratadora en combobox dispositivo
                    try
                    {
                        //En la base de datos un 1 representa Atendido y un 0 Representa a No Atendido 
                        ProgressBarBefore();
                        fallaDesh = await FallaTableDesh
                            .Where(Falla => Falla.idDeshidratadora == idDispositivo && Falla.Atendido == "1" && Falla.Fecha == date.ToString("yyyy-MM-dd"))
                            .ToCollectionAsync();
                        if (fallaDesh.Count >= 1)
                        {
                            listView.ItemsSource = fallaDesh;
                            ProgressBarAfter();
                            listView.Visibility = Visibility.Visible;
                        }
                        else
                        {
                            MessageDialog mensaje = new MessageDialog("No existe registro para esta fecha", "No existe registro");
                            await mensaje.ShowAsync();
                            listView.Visibility = Visibility.Collapsed;
                            ProgressBarAfter();

                        }
                    }
                    catch (MobileServiceInvalidOperationException ex)
                    {
                        exception = ex;
                    }

                    if (exception != null)
                    {
                        await new MessageDialog(exception.Message, "Error al cargar!").ShowAsync();
                    }

                }
                else if(comboBoxEstado.SelectedIndex == 1 && comboBoxDispositivo.SelectedIndex == 1)
                {
                    //Index de comboboxEstado esta en 1 y es No Atendido 
                    //Se selecciono Deshidratadora en combobox dispositivo
                    try
                    {
                        //En la base de datos un 1 representa Atendido y un 0 Representa a No Atendido 
                        ProgressBarBefore();
                        fallaDesh = await FallaTableDesh
                            .Where(Falla => Falla.idDeshidratadora == idDispositivo && Falla.Atendido == "0" && Falla.Fecha == date.ToString("yyyy-MM-dd"))
                            .ToCollectionAsync();
                        if (fallaDesh.Count >= 1)
                        {
                            listView.ItemsSource = fallaDesh;
                            ProgressBarAfter();
                            listView.Visibility = Visibility.Visible;
                        }
                        else
                        {
                            MessageDialog mensaje = new MessageDialog("No existe registro para esta fecha", "No existe registro");
                            await mensaje.ShowAsync();
                            listView.Visibility = Visibility.Collapsed;
                            ProgressBarAfter();

                        }
                    }
                    catch (MobileServiceInvalidOperationException ex)
                    {
                        exception = ex;
                    }

                    if (exception != null)
                    {
                        await new MessageDialog(exception.Message, "Error al cargar!").ShowAsync();
                    }

                }


            }
            

        }
 private void DatePickerToChart_DateChanged(object sender, DatePickerValueChangedEventArgs e)
 {
     DateTime date = DatePickerToChart.Date.DateTime;
     /*string idRefrigerador;
     if (comboBox.SelectedItem != null)
     {
         object selectedItem = comboBox.SelectedValue.ToString();
         idRefrigerador = selectedItem.ToString();
     }
     else
     {
         MessageDialog mensaje = new MessageDialog("Seleccione un refrigerador.", "No selecciono refrigerador");
         await mensaje.ShowAsync();
         idRefrigerador = "NOREF";
     }*/
     LoadChartContents(date);
 }
 private void DemoDatePicker_DateChanged(object sender, DatePickerValueChangedEventArgs e)
 {
     DateMoonTextBlock.Text = CustomDisplayDate(DemoDatePicker.Date.DateTime);
     DateSunTextBlock.Text = "";
 }
Exemplo n.º 52
0
 private void DatePicker_DateChanged(object sender, DatePickerValueChangedEventArgs e)
 {
     Age.Text = $"{(DateTime.Now - e.NewDate).TotalDays} дней";
 }
Exemplo n.º 53
0
 private void pckDate_DateChanged(object sender, DatePickerValueChangedEventArgs e)
 {
     int lastSetNo = _logEntryDao.GetLastSetNo(selectedExercise, pckDate.Date.Date);
     int newSetNo = ++lastSetNo;
     txtSet.Text = newSetNo.ToString();
 }
Exemplo n.º 54
0
 private void DatePicker_DateChanged(object sender, DatePickerValueChangedEventArgs e)
 {
     currentExcuse.LastUsed = datePicker.Date;
     
 }
 private void DeliveryDatePicker_DateChanged(object sender, DatePickerValueChangedEventArgs e)
 {
 }
        private void inputRokTrajanja_DateChanged(object sender, DatePickerValueChangedEventArgs e)
        {
            //inputRokTrajanja
            DateTime rokTrajanja = inputRokTrajanja.Date.Date;
            DateTime danes = DateTime.Now;

            int rokTrajanja_result = DateTime.Compare(rokTrajanja, danes);

            if (rokTrajanja_result <= 0)
            {
                inputRokTrajanja.Foreground = new SolidColorBrush(Colors.Red);            
                zdraviloDateIsSelected = false;
            }
            else
            {
                inputRokTrajanja.Foreground = new SolidColorBrush(Colors.Green);
                zdraviloDateIsSelected = true;
            }
        }
Exemplo n.º 57
0
        private void DateChanged_Apps(object sender, DatePickerValueChangedEventArgs e)
        {
            var localSetting = ApplicationData.Current.LocalSettings;
            Object value = localSetting.Values["CheckBorn"];
            string born = (string)value;

            if (DateTime.Now.Year < DatePickerApp.Date.Year)
            {
                TextNotification.Text = "Bạn nhập thời gian trong tương lai, vui lòng nhập lại.";
                HaveWeek.Text = "0";
            }
            else if (DateTime.Now.Year == DatePickerApp.Date.Year && DateTime.Now.Month < DatePickerApp.Date.Month)
            {
                TextNotification.Text = "Bạn nhập thời gian trong tương lai, vui lòng nhập lại.";
                HaveWeek.Text = "0";
            }
            else if (DateTime.Now.Year == DatePickerApp.Date.Year && DateTime.Now.Month == DatePickerApp.Date.Month
                && DateTime.Now.Day < DatePickerApp.Date.Day)
            {
                TextNotification.Text = "Bạn nhập thời gian trong tương lai, vui lòng nhập lại.";
                HaveWeek.Text = "0";
            }
            else if ((DateTime.Now.Year - DatePickerApp.Date.Year) >= 1)
            {
                TextNotification.Text = "Có vẻ không đúng, vui lòng nhập lại.";
                HaveWeek.Text = "0";
            }
            else
            {
                CountTime c_Time = new CountTime(DatePickerApp.Date);
                _week = c_Time.CountWeek();
                HaveWeek.Text = _week.ToString();
                _month = c_Time.HaveMonth();
                localSetting.Values["TimeApp"] = DatePickerApp.Date.ToString("dd/MM/yyyy");
            }
        }
Exemplo n.º 58
0
 private void dateControl_DateChanged(object sender, DatePickerValueChangedEventArgs e)
 {
     LoadScheduleInUI();
 }