Example #1
0
        private static OtherMoneyAsset GetOtherRubAsset()
        {
            var result    = new OtherMoneyAsset();
            var nameField = new StringField("Имя", "Заначка в книге в рублях");

            result.Fields.Add(nameField.Name, nameField);
            var value = new CurrencyField("Значение", new CurencyValue(Currency.GetAllCurrencies()[1], 1000));

            result.Fields.Add(value.Name, value);
            return(result);
        }
Example #2
0
        private static OtherMoneyAsset GetOtherUsdAsset()
        {
            var result    = new OtherMoneyAsset();
            var nameField = new StringField("Имя", "Заначка под кроватью в долларах");

            result.Fields.Add(nameField.Name, nameField);
            var value = new CurrencyField("Значение", new CurencyValue(Currency.GetAllCurrencies()[0], 100));

            result.Fields.Add(value.Name, value);
            return(result);
        }
Example #3
0
 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);
         }
     }
 }