Esempio n. 1
0
        private void button3_Click(object sender, EventArgs e)
        {
            yhgl tm = new yhgl(this);

            this.Hide();
            tm.Show();
        }
Esempio n. 2
0
        public lookyh(yhgl temp)
        {
            InitializeComponent();
            t1 = temp;

            listView1.Columns.Add("账号", 105, HorizontalAlignment.Center);
            listView1.Columns.Add("姓名", 105, HorizontalAlignment.Center);
            listView1.Columns.Add("职称", 105, HorizontalAlignment.Center);


            listView1.Items.Clear();                //每次点击事件后将ListView中的数据清空,重新显示

            listView1.GridLines     = true;         //表格是否显示网格线
            listView1.FullRowSelect = true;         //是否选中整行
            listView1.View          = View.Details; //设置显示方式
            listView1.Scrollable    = true;         //是否自动显示滚动条
            listView1.MultiSelect   = true;         //是否可以选择多行


            String          cmd = "select * from user";
            MySqlDataReader dgv = MySqlHelper.ExecuteReader(MySqlHelper.Conn, CommandType.Text, cmd, null);

            while (dgv.Read())
            {
                Add(dgv);
            }
        }