Пример #1
0
        private RabNamesList getNamesForExport()
        {
            RabNamesList result = new RabNamesList();

            foreach (ListViewItem lvi in lvNames.Items)
            {
                result.Add(lvi.Tag as RabName);
            }
            return(result);
        }
Пример #2
0
        public static RabNamesList GetNames(MySqlConnection sql)
        {
            RabNamesList    result = new RabNamesList();
            MySqlCommand    cmd    = new MySqlCommand("SELECT n_id, n_sex, n_name, n_surname, n_use, n_block_date FROM names ORDER BY n_name;", sql);
            MySqlDataReader rd     = cmd.ExecuteReader();

            while (rd.Read())
            {
                result.Add(fillName(rd));
            }
            rd.Close();

            return(result);
        }