private void frmEmployeeManager_Load(object sender, EventArgs e) { lblStatusThongTinTaiKhoan.Text = ""; lblStatusUpdatePermission.Text = ""; LoadCurrentUser(); LoadOtherUser(""); //Add UserGroupName to Combox DataSet ds = new DataAccess().getAllLoaiNhanvien(); string UserGroupName; int intRowsCount = ds.Tables[0].Rows.Count; for (int i = 0; i < intRowsCount; i++) { UserGroupName = Convert.ToString(ds.Tables[0].Rows[i]["TenLoaiNV"]); cboUserGroupName.Properties.Items.Add(UserGroupName); } chkListBoxPermission_Init(); customListBoxCurrentUser.SelectedIndex = 0; customListBoxOtherUser.SelectedIndex = -1; currentItem = (CustomListBoxItem)customListBoxCurrentUser.SelectedItem; currentIndex = customListBoxCurrentUser.SelectedIndex; }
private void customListBoxOtherUser_SelectedIndexChanged(object sender, EventArgs e) { if (customListBoxOtherUser.SelectedIndex >= 0) { currentItem = (CustomListBoxItem)customListBoxOtherUser.SelectedItem; currentIndex = customListBoxOtherUser.SelectedIndex; customListBoxCurrentUser.SelectedIndex = -1; Update_Info(); } }