Example #1
0
 private void bandComb()
 {
     htlist = htdao.fetchAll("select id,name from tbl_host_type");
     comboBox1.Items.Clear();
     comboBox2.Items.Clear();
     foreach (HostType ht in htlist)
     {
         comboBox1.Items.Add(HostTypeDao.formatItemByItem(ht));
         comboBox2.Items.Add(HostTypeDao.formatItemByItem(ht));
     }
 }
Example #2
0
        private void reflushTableHostDomain(int type)
        {
            dataGridView1.Rows.Clear();
            hdlist = hddao.fetchAll("select id,ip,domain,type from tbl_host_domain where type=" + type);
            foreach (HostDomain host in hdlist)
            {
                int index = dataGridView1.Rows.Add();
                dataGridView1.Rows[index].Cells["id"].Value     = host.Id;
                dataGridView1.Rows[index].Cells["ip"].Value     = host.Ip;
                dataGridView1.Rows[index].Cells["domain"].Value = host.Domain;

                ht = htdao.fetch("select id,name from tbl_host_type where id=" + host.Type);
                dataGridView1.Rows[index].Cells["type"].Value = HostTypeDao.formatItemByItem(ht);
            }
        }