Пример #1
0
        public void AddEcuacion(Ecuacion nuevaEcuacion)
        {
            var context = new SimplexEntities();

            nuevaEcuacion.Id = BuscoMax();
            context.Ecuacions.Add(nuevaEcuacion);
            context.SaveChanges();
        }
Пример #2
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            ISimplexRepository repositorio = new SQLRepository();
            var addEcu = new Ecuacion
            {
                Id       = 0,
                Nro_Ecu  = 1,
                Variable = "X2",
                Valor    = 3
            };

            repositorio.AddEcuacion(addEcu);
        }
Пример #3
0
        public IEnumerable <Ecuacion> GetEcuacion()
        {
            var ecuacion = new List <Ecuacion>();

            if (File.Exists(path))
            {
                var    sr = new StreamReader(path);
                string line;
                while ((line = sr.ReadLine()) != null)
                {
                    var elems = line.Split(',');
                    var ecua  = new Ecuacion()
                    {
                        Id       = Int32.Parse(elems[0]),
                        Nro_Ecu  = Int32.Parse(elems[1]),
                        Valor    = Int32.Parse(elems[2]),
                        Variable = elems[3]
                    };
                    ecuacion.Add(ecua);
                }
            }
            return(ecuacion);
        }
Пример #4
0
 public void AddEcuacion(Ecuacion nuevaEcuacion)
 {
     throw new NotImplementedException();
 }