Esempio n. 1
0
        private void cbDepart_SelectedIndexChanged(object sender, EventArgs e)
        {
            int          index = cbDepart.SelectedIndex;
            SqlServerDAL sql   = new SqlServerDAL();

            List <Employee_info> list = sql.Rename(index);


            lbemployee.DisplayMember = "EmployeeName";
            lbemployee.ValueMember   = "EmployeeId";
            lbemployee.DataSource    = list;
        }
Esempio n. 2
0
        private void cmbDept_SelectedIndexChanged(object sender, EventArgs e)
        {
            //lbname.Items.Clear();
            int          index = cmbDept.SelectedIndex;
            SqlServerDAL sql   = new SqlServerDAL();
            //SqlDataReader dt= sql.Rename(index);
            List <Employee_info> list = sql.Rename(index);

            lbname.DataSource    = list;
            lbname.DisplayMember = "EmployeeName";
            lbname.ValueMember   = "EmployeeId";
        }