示例#1
0
        private void metroLink1_Click(object sender, EventArgs e)
        {
            Giris g = new Giris();

            g.Show();
            this.Hide();
        }
示例#2
0
        private void simpleButton2_Click(object sender, EventArgs e)
        {
            Giris giris = new Giris();

            giris.Show();
            this.Hide();
        }
示例#3
0
 private void Kayitbtn_Click(object sender, EventArgs e)
 {
     using (var db = new OtelDbcontext())
     {
         if (string.IsNullOrWhiteSpace(TcNotbox.Text) || string.IsNullOrWhiteSpace(Adtbox.Text) || string.IsNullOrWhiteSpace(soyadtbox.Text) ||
             string.IsNullOrWhiteSpace(epostotbox.Text) || string.IsNullOrWhiteSpace(sifreTbox.Text) || string.IsNullOrWhiteSpace(teltbox.Text))
         {
             MessageBox.Show("You must fill in the all empty fields");
         }
         else
         {
             string ad, soyad, telefon, eposta, sifre;
             int    TcNo;
             TcNo    = Convert.ToInt32(TcNotbox.Text);
             ad      = Adtbox.Text;
             soyad   = soyadtbox.Text;
             telefon = teltbox.Text;
             eposta  = epostotbox.Text;
             sifre   = sifreTbox.Text;
             var query = new MusteriKayit()
             {
                 Ad       = ad,
                 Eposta   = eposta,
                 Sifre    = sifre,
                 Soyad    = soyad,
                 TCKimlik = TcNo,
                 IsTrue   = false,
                 telefon  = Convert.ToInt32(telefon)
             };
             db.musteriKayits.Add(query);
             db.SaveChanges();
             MessageBox.Show("Başarılı Kayıt");
             Giris frm = new Giris();
             frm.Show();
             this.Hide();
         }
     }
 }