Example #1
0
        private void btnConfirm_Click(object sender, RoutedEventArgs e)
        {
            DateTime startDate, endDate;

            try
            {
                if (string.IsNullOrEmpty(FilterBase.StartDate.Operand) && string.IsNullOrEmpty(FilterBase.EndDate.Operand))
                {
                    MessageBox.Show("you must set start date and end date");
                    return;
                }

                if (string.IsNullOrEmpty(FilterBase.Writer.Operand))
                {
                    MessageBox.Show("Select a Writer");
                    return;
                }

                if (DateTime.TryParse(FilterBase.StartDate.Operand, out startDate) &&
                    DateTime.TryParse(FilterBase.EndDate.Operand, out endDate))
                {
                    TraceListManager.DeleteRange(startDate, endDate, FilterBase.Writer.Operand);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
            this.Close();
        }
Example #2
0
        public FilterBaseWindow()
        {
            try
            {
                InitializeComponent();

                FilterBase = FilterBase ?? new FilterBaseModel();

                WriterList = WriterList ?? new List <string>();

                WriterList.Add(string.Empty);

                var templist = TraceListManager.GetWriters();

                if (templist != null)
                {
                    WriterList.AddRange(templist.OrderBy(w => w));
                }

                this.DataContext = this;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
Example #3
0
 private void refreshTraces_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         TraceListManager.RefreshData(FilterBase);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString());
     }
 }
Example #4
0
        private void btnConfirm_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                MainWindow.FilterBase = FilterBase;

                TraceListManager.RefreshData(MainWindow.FilterBase);

                this.Close();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
Example #5
0
        public DeleteRangeWindow()
        {
            InitializeComponent();
            try
            {
                FilterBase = new FilterBaseModel();

                WriterList = TraceListManager.GetWriters() ?? new List <string>();

                this.DataContext = this;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }