private void AddStudent_Load(object sender, EventArgs e) { grups = new Grups(); grups.OpenConnection(connectionString); comboBox_Grups.Items.AddRange(grups.GetAllGrups()); grups.CloseConnection(); }
public DeleteGrup() { InitializeComponent(); connectionString = ConfigurationManager.AppSettings["connectionString"]; grups = new Grups(); grups.OpenConnection(connectionString); this.comboBox_Grups.Items.AddRange(grups.GetAllGrups()); grups.CloseConnection(); }
public EnterMarks(int id) { InitializeComponent(); this.id = id; connectionString = ConfigurationManager.AppSettings["connectionString"]; Predmets pr = new Predmets(); pr.OpenConnection(connectionString); comboBox_Predmet.Items.AddRange(pr.GetPredmetsByPrepodId(id)); pr.CloseConnection(); Grups g = new Grups(); g.OpenConnection(connectionString); comboBox_Group.Items.AddRange(g.GetAllGrups()); g.CloseConnection(); }