예제 #1
0
        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);
        }
예제 #2
0
        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);
        }
예제 #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);
         }
     }
 }