Beispiel #1
0
 //form load event
 private void LoadFormView(object sender, EventArgs e)
 {
     _ezMoneyModel    = new EZMoneyModel();
     _categoryPModel  = new CategoryPresentationModel(_ezMoneyModel);
     _recordPModel    = new RecordPresentationModel(_ezMoneyModel);
     _statisticPModel = new StatisticPresentationModel(_ezMoneyModel);
     InitCategoryView();
     InitRecordView();
     InitStatisticView();
 }
Beispiel #2
0
 //refresh record view
 void RefreshRecordView(RecordPresentationModel recordPModel)
 {
     _dateTimePickerRecord.Value     = _recordPModel.RecordDate;
     _comboBoxCategory.SelectedIndex = _recordPModel.CategoryIndex;
     _textBoxRecordAmount.Text       = _recordPModel.Amount;
     _buttonRecordAdd.Enabled        = _recordPModel.IsAddEnable;
     _buttonRecordModify.Enabled     = _recordPModel.IsModifyEnable;
     _buttonRecordModify.Visible     = _recordPModel.IsModifyEnable;
     _buttonRecordDelete.Enabled     = _recordPModel.IsDeleteEnable;
     _buttonRecordDelete.Visible     = _recordPModel.IsDeleteEnable;
     _buttonRecordCancel.Enabled     = _recordPModel.IsCancelEnable;
     _buttonRecordCancel.Visible     = _recordPModel.IsCancelEnable;
     _radioButtonIncome.Checked      = _recordPModel.IsIncomeCheck;
     _radioButtonExpense.Checked     = _recordPModel.IsExpenseCheck;
     _errorProviderRecord.SetError(_buttonRecordAdd, _recordPModel.ErrorProviderMessage);
     //if you want to visible/unvisible modification function, uncomment under line.
     //_tableLayoutPanelRecord.RowStyles[2].Height = _recordPModel.IsSelectionMode ? 40 : 0;
 }