Пример #1
0
 public void AddCombinationParam(Combination combination, CombinParam param, CombinParamName name, decimal value)
 {
     if (param == null || combination == null) return;
     param.Combination = combination;
     param.Value = value;
     param.CombinParamName = name;
     dssDbContext.CombinParams.Local.Add(param);
 }
 protected override Combination CreateCombinationTemplate()
 {
     var combinParamNameF = new CombinParamName {Name = "Увел. проц. ставки"};
     var combinParamNameS = new CombinParamName{Name = "Увел. ном. цены"};
     return new Combination
         {
             SavingId = base.SavingID,
             CombinParams = new Collection<CombinParam>
                 {
                     new CombinParam{CombinParamName = combinParamNameF},
                     new CombinParam{CombinParamName = combinParamNameS}
                 }
         };
 }
Пример #3
0
        public Model(BaseLayer baseLayer, Preferences preferences)
        {
            //конструктор класса, создает задачу и константу (только одна, Ставка)
            _baseLayer = baseLayer;
            _preferences = preferences;
            stake = new TaskParamName() { Name = "Ставка" };
            stakeValue = new TaskParam { Task = _baseLayer.Task };
            bonus = new EventParamName() { Name = "Бонус" };
            soeg = new CombinParamName() { Name = "SoEG" };

            InitialEvents = preferences.evenoddGame
                                ? InitialEvents = preferences.evenoddNames
                                : InitialEvents = preferences.numericNames;
            game = new Dice(InitialEvents.Length, preferences.numberofthrowings); //, preferences.numberofoutcomesperstake);
            GenerateEvents();
        }
 protected override Combination CreateCombinationTemplate()
 {
     var combinParamNameS = new CombinParamName { Name = "Доход:" };
     return new Combination
     {
         SavingId = base.SavingID,
         CombinParams = new Collection<CombinParam>
                 {
                     new CombinParam{CombinParamName = combinParamNameS}
                 }
     };
 }