private static NonMoneyAsset GetUsdNonMoneyAsset() { var result = new NonMoneyAsset(); var nameField = new StringField("Имя", "Картина Пикассо"); result.Fields.Add(nameField.Name, nameField); var nbs = new CurrencyField("Начальная балансовая стоимость", new CurencyValue(Currency.GetAllCurrencies()[0], 1000000)); result.Fields.Add(nbs.Name, nbs); var obs = new CurrencyField("Остаточная балансовая стоимость", new CurencyValue(Currency.GetAllCurrencies()[0], 1000000)); result.Fields.Add(obs.Name, obs); var os = new CurrencyField("Оценочная стоимость", new CurencyValue(Currency.GetAllCurrencies()[0], 1000000)); result.Fields.Add(os.Name, os); return(result); }
private static NonMoneyAsset GetRubNonMoneyAsset() { var result = new NonMoneyAsset(); var nameField = new StringField("Имя", "Офис"); result.Fields.Add(nameField.Name, nameField); var nbs = new CurrencyField("Начальная балансовая стоимость", new CurencyValue(Currency.GetAllCurrencies()[1], 1000000)); result.Fields.Add(nbs.Name, nbs); var obs = new CurrencyField("Остаточная балансовая стоимость", new CurencyValue(Currency.GetAllCurrencies()[1], 1000000)); result.Fields.Add(obs.Name, obs); var os = new CurrencyField("Оценочная стоимость", new CurencyValue(Currency.GetAllCurrencies()[1], 1000000)); result.Fields.Add(os.Name, os); var additionalField = new StringField("Адресс", "Пушкинская 198"); result.Fields.Add(additionalField.Name, additionalField); return(result); }
private void AssetTypeCB_SelectedValueChanged(object sender, EventArgs e) { if (!_fieldsInitialized) { AssetTypeCB.Enabled = false; if (AssetTypeCB.SelectedItem.ToString() == "Актив банковского счёта") { var asset = new BankMoneyAsset(); ShowNewAsset(asset); } else if (AssetTypeCB.SelectedItem.ToString() == "Денежный актив") { var asset = new OtherMoneyAsset(); ShowNewAsset(asset); } else { var asset = new NonMoneyAsset(); ShowNewAsset(asset); } } }