Exemplo n.º 1
0
        private void _view_OnLoadView(object sender, EventArgs e)
        {
            _view.ComboBoxBulanAwal.SelectedIndex = 0; // Januari

            var year = DateTime.Now.Year;

            _view.NumericUpDownTahun.Value      = year;
            _view.NumericUpDownTahunAwal.Value  = year;
            _view.NumericUpDownTahunAkhir.Value = year;

            _listObjs    = _services.GetByMonthYear(new MonthYear(DateTime.Now.Month, DateTime.Now.Year)).ToList();
            _bindingView = new BindingListView <StatusPerBarangModel>(_listObjs);
            _view.ListDataGrid.DataSource = _bindingView;

            SetLabelTotal();
        }
        private void ShouldReturnSuccessForGetByMonthYear()
        {
            IEnumerable <IStatusPerBarangModel> model = null;

            try
            {
                model = _services.GetByMonthYear(new MonthYear(9, 2019));
            }
            catch (DataAccessException ex)
            {
                _testOutputHelper.WriteLine(ex.DataAccessStatusInfo.GetFormatedValues());
            }

            Assert.True(model != null);

            if (model != null)
            {
                TestsHelper.WriteModel(_testOutputHelper, model);
            }
        }