Пример #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            izinler izin = new izinler();

            izin.Show();
            this.Hide();
        }
Пример #2
0
        private void kaydet()
        {
            try
            {
                baglan.Open();

                SqlCommand komut = new SqlCommand("Insert into izinler (personel,pazartesi,sali,carsamba,persembe,cuma,cumartesi,pazar) values ('" + textBox1.Text.ToString() + "','" + textBox2.Text.ToString() + "','" + textBox3.Text.ToString() + "','" + textBox4.Text.ToString() + "','" + textBox5.Text.ToString() + "','" + textBox6.Text.ToString() + "','" + textBox7.Text.ToString() + "','" + textBox8.Text.ToString() + "'", baglan);
                komut.ExecuteNonQuery();
                baglan.Close();
                MessageBox.Show("Kayıt Başarılı!");
            }
            catch (Exception)
            {
                MessageBox.Show("Bir hata oluştu. Lütfen tekrar deneyiniz.");
                izinler ne = new izinler();
                ne.Show();
                this.Hide();
            }
        }