Beispiel #1
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                id = Convert.ToInt32(((TextBlock)dgwKullaniciGuncelle.Columns[0].GetCellContent(dgwKullaniciGuncelle.SelectedValue)).Text);


                var p = db.tbl_UserAccount.Find(id);
                db.tbl_UserAccount.Remove(p);
                db.SaveChanges();
                ucKullaniciGuncelle gncl = new ucKullaniciGuncelle();
                gncl.UserControl_Loaded(sender, e);
                UserControllerCagir.Uc_Ekle(gk.Content_Icerik, gncl);
            }
            catch
            {
                MessageBox.Show("Lütfen listeden silmek istediğiniz kullanıcıyı seçin.");
                gk.Opacity = 1;
            }
        }
Beispiel #2
0
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            Regex r = new Regex(@"^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$");



            int id = Convert.ToInt32(lblIDAl.Content);

            lblHata.Content = "";

            if (txtSifre.Password == txtSifreTekrar.Password && (

                    !string.IsNullOrWhiteSpace(txtAd.Text) &&
                    !string.IsNullOrWhiteSpace(txtSoyad.Text) &&
                    !string.IsNullOrWhiteSpace(txtYas.Text) &&
                    !string.IsNullOrWhiteSpace(Datepicker.Text) &&
                    !string.IsNullOrWhiteSpace(txtMail.Text) &&
                    !string.IsNullOrWhiteSpace(txtOkul.Text) &&
                    !string.IsNullOrWhiteSpace(txtTecrube.Text) &&
                    !string.IsNullOrWhiteSpace(txtSifre.Password) &&
                    !string.IsNullOrWhiteSpace(txtKullaniciAdi.Text) && r.IsMatch(txtMail.Text)
                    ))
            {
                var user = db.tbl_UserAccount.Find(id);
                user.USERAD          = txtAd.Text.Trim();
                user.USERSOYAD       = txtSoyad.Text;
                user.USERYAS         = int.Parse(txtYas.Text);
                user.USERDOGUMTARIHI = DateTime.Parse(Datepicker.Text);
                user.USERMAIL        = txtMail.Text;
                user.USEROKUL        = txtOkul.Text;
                user.USERDENEYIM     = int.Parse(txtTecrube.Text);
                user.USERNICK        = txtKullaniciAdi.Text;
                user.USERPASSWORD    = (txtSifre.Password);
                db.SaveChanges();
                this.Close();
                gk.Opacity = 1;

                KullaniciListele gncl = new KullaniciListele();
                gncl.UserControl_Loaded(sender, e);
                UserControllerCagir.Uc_Ekle(gk.Content_Icerik, gncl);
            }


            else if (


                !string.IsNullOrWhiteSpace(txtAd.Text) &&
                !string.IsNullOrWhiteSpace(txtSoyad.Text) &&
                !string.IsNullOrWhiteSpace(txtYas.Text) &&
                !string.IsNullOrWhiteSpace(Datepicker.Text) &&
                !string.IsNullOrWhiteSpace(txtMail.Text) &&
                !string.IsNullOrWhiteSpace(txtOkul.Text) &&
                !string.IsNullOrWhiteSpace(txtTecrube.Text) &&
                !string.IsNullOrWhiteSpace(txtSifre.Password) &&
                !string.IsNullOrWhiteSpace(txtKullaniciAdi.Text) && r.IsMatch(txtMail.Text)

                )
            {
                MessageBox.Show("Lütfen şifre değerlerini aynı girin");
            }



            else if (


                txtSifre.Password == txtSifreTekrar.Password && (

                    !string.IsNullOrWhiteSpace(txtAd.Text) &&
                    !string.IsNullOrWhiteSpace(txtSoyad.Text) &&
                    !string.IsNullOrWhiteSpace(txtYas.Text) &&
                    !string.IsNullOrWhiteSpace(Datepicker.Text) &&
                    !string.IsNullOrWhiteSpace(txtMail.Text) &&
                    !string.IsNullOrWhiteSpace(txtOkul.Text) &&
                    !string.IsNullOrWhiteSpace(txtTecrube.Text) &&
                    !string.IsNullOrWhiteSpace(txtSifre.Password) &&
                    !string.IsNullOrWhiteSpace(txtKullaniciAdi.Text)
                    ))
            {
                lblHata.Content = ("Eposta adresinizi kontrol ediniz.");
            }
            else
            {
                lblHata.Content = "Lütfen boş alanları doldurunuz.";
            }
        }
Beispiel #3
0
 public void Button_Click_2(object sender, RoutedEventArgs e)
 {
     UserControllerCagir.Uc_Ekle(Content_Icerik, new ucKullaniciGuncelle());
 }
Beispiel #4
0
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     UserControllerCagir.Uc_Ekle(Content_Icerik, new KullaniciListele());
 }
Beispiel #5
0
 private void Menubutton_KullanıcıListesi_Click(object sender, RoutedEventArgs e)
 {
     UserControllerCagir.Uc_Ekle(Content_Icerik, new KullaniciListele());
 }
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            tbl_UserAccount t = new tbl_UserAccount();

            lblHata.Content = "";



            if (txtSifre.Password == txtSifreTekrar.Password && (

                    !string.IsNullOrWhiteSpace(txtAd.Text) &&
                    !string.IsNullOrWhiteSpace(txtSoyad.Text) &&
                    !string.IsNullOrWhiteSpace(txtYas.Text) &&
                    !string.IsNullOrWhiteSpace(Datepicker.Text) &&
                    !string.IsNullOrWhiteSpace(txtMail.Text) &&
                    !string.IsNullOrWhiteSpace(txtOkul.Text) &&
                    !string.IsNullOrWhiteSpace(txtTecrube.Text) &&
                    !string.IsNullOrWhiteSpace(txtSifre.Password) &&
                    !string.IsNullOrWhiteSpace(txtKullaniciAdi.Text)
                    ))
            {
                t.USERAD          = txtAd.Text;
                t.USERSOYAD       = txtSoyad.Text;
                t.USERMAIL        = txtMail.Text;
                t.USEROKUL        = txtOkul.Text;
                t.USERYAS         = Convert.ToInt32(txtYas.Text);
                t.USERDENEYIM     = Convert.ToInt32(txtTecrube.Text);
                t.USERDOGUMTARIHI = Convert.ToDateTime(Datepicker.DisplayDate);
                t.USERNICK        = txtKullaniciAdi.Text;
                t.USERPASSWORD    = txtSifre.Password;
                t.USERSTATUS      = Convert.ToBoolean(cbxAdmin.IsChecked);



                db.tbl_UserAccount.Add(t);
                db.SaveChanges();
                this.Close();
                MainWindow       frm  = new MainWindow();
                KullaniciListele klnc = new KullaniciListele();
                klnc.UserControl_Loaded(sender, e);
                UserControllerCagir.Uc_Ekle(gk.Content_Icerik, klnc);
                frm.Opacity = 1;
            }


            else if (


                !string.IsNullOrWhiteSpace(txtAd.Text) &&
                !string.IsNullOrWhiteSpace(txtSoyad.Text) &&
                !string.IsNullOrWhiteSpace(txtYas.Text) &&
                !string.IsNullOrWhiteSpace(Datepicker.Text) &&
                !string.IsNullOrWhiteSpace(txtMail.Text) &&
                !string.IsNullOrWhiteSpace(txtOkul.Text) &&
                !string.IsNullOrWhiteSpace(txtTecrube.Text) &&
                !string.IsNullOrWhiteSpace(txtSifre.Password) &&
                !string.IsNullOrWhiteSpace(txtKullaniciAdi.Text)

                )
            {
                MessageBox.Show("Lütfen şifre değerlerini aynı girin");
            }
            else
            {
                lblHata.Content = "Lütfen boş alanları doldurunuz.";
            }
        }