Esempio n. 1
0
        private void Form4_Load(object sender, EventArgs e)
        {
            try
            {
                SqlConnection myconnection = new SqlConnection("Data Source=DESKTOP-G51H1QD\\SQLEXPRESS;Initial Catalog=DatabaseManagementProject;Integrated Security=True;Connect Timeout=15;Encrypt=False;TrustServerCertificate=False");

                string[] a = sorgu.SelectBolumCBox();

                for (int i = 0; i < a.Length; i++)
                {
                    Bolum_Cbox.Items.Add(a[i]);
                }

                string[] b = sorgu.SelectUnvanCbox();

                for (int i = 0; i < b.Length; i++)
                {
                    Unvan_Cbox.Items.Add(b[i]);
                }

                string[] c = sorgu.SelectMeslekCBox();

                for (int i = 0; i < c.Length; i++)
                {
                    Meslek_Cbox.Items.Add(c[i]);
                }


                Refresh1();
            }
            catch (Exception h)
            {
                MessageBox.Show(h.ToString(), "Hata Kod:15", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }