Пример #1
0
        private void initViews()
        {
            // List<WarnningDataSource.ErrorInfo> mListRecords = Warnning.getAllRecords(null);
            // this.lv_warnnings.ItemsSource = mListRecords;

            this.datePicker_start.SelectedDate = DateTime.Now.AddDays(-1);
            this.datePicker_end.SelectedDate   = DateTime.Now;
            List <Category> cats = Category.GetCategories(TABLE);

            cats.Insert(0, new Category()
            {
                id = -1, description = "全部"
            });
            this.cb_category.ItemsSource       = cats;
            this.cb_category.DisplayMemberPath = "description";
            this.cb_category.SelectedValuePath = "id";
            this.cb_category.SelectedIndex     = 0;
        }
Пример #2
0
        private void initView()
        {
            //List<Log.Journal> listLogs = Log.getAllLogs(null);
            //this.lv_logs.ItemsSource = listLogs;

            this.datePicker_start.SelectedDate = DateTime.Now.AddDays(-1);
            this.datePicker_end.SelectedDate   = DateTime.Now;

            List <Category> cats = Category.GetCategories(TABLE);

            cats.Insert(0, new Category()
            {
                id = -1, description = "全部"
            });
            this.cb_category.ItemsSource       = cats;
            this.cb_category.DisplayMemberPath = "description";
            this.cb_category.SelectedValuePath = "id";
            this.cb_category.SelectedIndex     = 0;
        }