Esempio n. 1
0
        public ActionResult Index(Components components)
        {
            #region --- Ввод тестовых данных в базу данных

            Components component_1 = new Components {
                NameComponent = "Чугун литейный хромоникелевый", Cost = 75.5, MinValComponent = 45.0, MaxValComponent = 75.0, IsSolve = true, Owner = _users.CurrentUser
            };
            _components.InsertOrUpdate(component_1);
            _components.Save();

            Components component_2 = new Components {
                NameComponent = "Чугун литейный коксовый", Cost = 68.0, MinValComponent = 0.0, MaxValComponent = 100.0, IsSolve = true, Owner = _users.CurrentUser
            };
            _components.InsertOrUpdate(component_2);
            _components.Save();

            Components component_3 = new Components {
                NameComponent = "Чугун зеркальный", Cost = 97.0, MinValComponent = 10.0, MaxValComponent = 20.0, IsSolve = true, Owner = _users.CurrentUser
            };
            _components.InsertOrUpdate(component_3);
            _components.Save();

            Components component_4 = new Components {
                NameComponent = "Лом чугунный", Cost = 36.2, MinValComponent = 6.0, MaxValComponent = 15.0, IsSolve = true, Owner = _users.CurrentUser
            };
            _components.InsertOrUpdate(component_4);
            _components.Save();

            Components component_5 = new Components {
                NameComponent = "Лом стальной", Cost = 34.3, MinValComponent = 6.0, MaxValComponent = 15.0, IsSolve = true, Owner = _users.CurrentUser
            };
            _components.InsertOrUpdate(component_5);
            _components.Save();

            Components component_6 = new Components {
                NameComponent = "Возврат", Cost = 36.2, MinValComponent = 12.0, MaxValComponent = 40.0, IsSolve = true, Owner = _users.CurrentUser
            };
            _components.InsertOrUpdate(component_6);
            _components.Save();

            Components component_7 = new Components {
                NameComponent = "Ферромарганец", Cost = 120.0, MinValComponent = 0.0, MaxValComponent = 100.0, IsSolve = true, Owner = _users.CurrentUser
            };
            _components.InsertOrUpdate(component_7);
            _components.Save();

            #endregion --- Ввод тестовых данных в базу данных

            return(RedirectToAction("Index"));
        }