Example #1
0
        private void initData()
        {
            dataGridView1.Rows.Clear();
            LocaleDao     dao  = new LocaleDao();
            List <Locale> list = dao.getLocales();

            foreach (Locale locale in list)
            {
                int index = dataGridView1.Rows.Add();
                dataGridView1.Rows[index].Tag            = locale;
                dataGridView1.Rows[index].Cells[0].Value = locale.LocaleId;
                dataGridView1.Rows[index].Cells[1].Value = locale.LocaleType;
                dataGridView1.Rows[index].Cells[2].Value = locale.LocaleName;
                dataGridView1.Rows[index].Cells[3].Value = locale.LocaleState;
                dataGridView1.Rows[index].Cells[4].Value = locale.LocaleExplain;
            }
        }