private void AddNewOffering() { if (cbSimpleIncome.IsChecked.Value) { SpareInIncomeSimpleEditView v = new SpareInIncomeSimpleEditView(); v._SpareName = GetSelectedSpareName(); v._SpareID = GetSelectedSpareId(); v._SpareIncomeID = _SpareIncomeID; v.CurrentCurrencyCode = CurrenctCurrencyCode; v._OfferingNumber = _OfferingNumber; v.IsSimpleInput = cbSimpleIncome.IsChecked.HasValue ? cbSimpleIncome.IsChecked.Value : false; v.ShowDialog(); } else { SpareInIncomeEditView v = new SpareInIncomeEditView(); v._SpareName = GetSelectedSpareName(); v._SpareID = GetSelectedSpareId(); v._SpareIncomeID = _SpareIncomeID; v.CurrentCurrencyCode = CurrenctCurrencyCode; v._OfferingNumber = _OfferingNumber; v.IsSimpleInput = cbSimpleIncome.IsChecked.HasValue ? cbSimpleIncome.IsChecked.Value : false; v.ShowDialog(); } }
private void EditSelectedOffering() { SpareInIncomeEditView v = new SpareInIncomeEditView(); v._OfferingID = getSelectedOfferingId(); v.CurrentCurrencyCode = edtCurrency.SelectedItem.ToString(); v.ShowDialog(); LoadOfferings(); }