Esempio n. 1
0
        private void SetLapse()
        {
            string query = $@"select * from lapse where id = '{RunSets.IdLapse}'";
            var    dt    = DbConn.GetResult(query);

            Lapse = new List <TableArray>();
            TableArray ta;

            foreach (var line in dt)
            {
                ta = new TableArray();

                var vals = new Dictionary <int, double>();
                for (int i = 3; i < line.Length; i++)
                {
                    vals.Add(i - 2, Convert.ToDouble(line[i]));
                }

                ta.SetValues(line[0].ToString(), line[1].ToString(), line[2].ToString(), vals);

                Lapse.Add(ta);
            }
        }
Esempio n. 2
0
        public void SetMort()
        {
            string query = $@"select * from mortality where id = '{RunSets.IdMort}'";
            var    dt    = DbConn.GetResult(query);

            Mort = new List <TableArray>();
            TableArray ta;

            foreach (var line in dt)
            {
                ta = new TableArray();

                var vals = new Dictionary <int, double>();
                for (int i = 3; i < line.Length; i++)
                {
                    vals.Add(i - 3, Convert.ToDouble(line[i]));
                }

                ta.SetValues(line[0].ToString(), line[1].ToString(), line[2].ToString(), vals);

                Mort.Add(ta);
            }
        }