private void Role_LB_SelectedIndexChanged(object sender, EventArgs e) { StaffClass SC = new StaffClass(); if (Role_LB.Text != null && Role_LB.Text.ToString() != "Category") { Assign_CB.Show(); Assign_label.Show(); Name_TB.ReadOnly = false; Description_TB.ReadOnly = false; ID_TB.ReadOnly = false; Assign_CB.Enabled = true; } else { Assign_CB.Hide(); Assign_label.Hide(); } string Role = Role_LB.Text.ToString(); switch (Role) { case "Category": break; case "Course": Assign_CB.DataSource = SC.CatNameRec(); break; case "Topic": Assign_CB.DataSource = SC.CourseNameRec(); break; } }
public TopCoursCatPopup() { InitializeComponent(); Assign_CB.Hide(); Assign_label.Hide(); }