コード例 #1
0
        private void ViewPrepod_Load(object sender, EventArgs e)
        {
            Prepods p = new Prepods();

            p.OpenConnection(connectionString);
            comboBox1.Items.AddRange(p.GetAllPrepods());
            p.CloseConnection();
        }
コード例 #2
0
ファイル: AddPredmet.cs プロジェクト: yan1998/eJournal
        private void AddPredmet_Load(object sender, EventArgs e)
        {
            Prepods p = new Prepods();

            p.OpenConnection(connectionString);
            this.comboBox_Prepods.Items.AddRange(p.GetAllPrepods());
            p.CloseConnection();
        }
コード例 #3
0
ファイル: DeletePeople.cs プロジェクト: yan1998/eJournal
 public DeletePeople(string mode)
 {
     InitializeComponent();
     this.mode        = mode;
     connectionString = ConfigurationManager.AppSettings["connectionString"];
     if (mode == "prepod")
     {
         Prepods p = new Prepods();
         p.OpenConnection(connectionString);
         comboBox1.Items.AddRange(p.GetAllPrepods());
         p.CloseConnection();
     }
     else if (mode == "student")
     {
         Students s = new Students();
         s.OpenConnection(connectionString);
         comboBox1.Items.AddRange(s.GetAllStudents().Split('\n'));
         s.CloseConnection();
     }
 }