Beispiel #1
0
        private void _Istatistik()
        {
            int i = 0, j = 1;

            BusinessLogicLayer.BLL bll = new BusinessLogicLayer.BLL();
            List <Istatistik_>     listChart = bll.IstatistikYazdir();

            if (listChart.Count == 0)
            {
                lbl_bilgi.Text = "Henüz öğrenilmiş bir kelime yok";
            }

            while (listChart.Count > 0 && i < listChart.Count)
            {
                if (listChart[i].Ay == j)
                {
                    chart_Istatistik.Series["Kelime"].Points.Add(new DevExpress.XtraCharts.SeriesPoint(aylar[j - 1], listChart[i].KelimeSayisi));
                    i++; j = 1;
                }
                else
                {
                    j++;
                }
                lbl_bilgi.Text = "Öğrenilmiş kelimelerin istatiksel grafiği";
            }
        }
Beispiel #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            BusinessLogicLayer.BLL BLL = new BusinessLogicLayer.BLL();
            int ReturnValue            = BLL.KullaniciEkle(txt_yeni_kullaniciadi.Text, txt_y_kullanicisifre.Text, txt_y_kullanicisifretekrar.Text, txt_kullanici_soru.Text, txt_kullanici_cevap.Text);

            if (ReturnValue != 0)
            {
                if (ReturnValue > 0)
                {
                    MessageBox.Show("Yeni Kullanici Eklendi", "Bilgilendirme", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    txt_yeni_kullaniciadi.Clear();
                    txt_y_kullanicisifre.Clear();
                    txt_y_kullanicisifretekrar.Clear();
                    txt_kullanici_soru.Clear();
                    txt_kullanici_cevap.Clear();
                }
                else
                {
                    MessageBox.Show("Şifreler Uyuşmuyor", "Hata", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    txt_yeni_kullaniciadi.Clear();
                    txt_y_kullanicisifre.Clear();
                    txt_y_kullanicisifretekrar.Clear();
                    txt_kullanici_soru.Clear();
                    txt_kullanici_cevap.Clear();
                }
            }
            else
            {
                MessageBox.Show("Farklı Kullanıcı Adı Giriniz", "Hata", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
Beispiel #3
0
        private void Kontrol()
        {
            BusinessLogicLayer.BLL BLL = new BusinessLogicLayer.BLL();


            if (KontrolCevap == true)
            {
                List <Kelime> ListeBasarili = BLL.ListeleDerece(4);
                for (int i = 0; i < ListeBasarili.Count; i++)
                {
                    if (ID == ListeBasarili[i].KelimeID)
                    {
                        BLL.KelimeDurumDuzenle(ID, "ogrenilmis");
                        BLL.KelimeDereceDuzenle(ID, -1);
                        KelimeDoldur();
                        break;
                    }
                }

                BLL.KelimeDereceDuzenle(ID, derece++);
                KelimeDoldur();
            }
            else
            {
                BLL.KelimeDurumDuzenle(ID, "ogren");
                BLL.KelimeDereceDuzenle(ID, -1);
                KelimeDoldur();
            }
        }
Beispiel #4
0
        private void addList()
        {
            BusinessLogicLayer.BLL BLL         = new BusinessLogicLayer.BLL();
            List <contacts>        ContactList = BLL.listContact();

            if (ContactList != null && ContactList.Count > 0)
            {
                lst_list.DataSource = ContactList;
            }
        }
        private void ListeDoldur()
        {
            BusinessLogicLayer.BLL BLL           = new BusinessLogicLayer.BLL();
            List <Rehber>          RehberListesi = BLL.KayitListe();

            if (RehberListesi != null && RehberListesi.Count > 0)
            {
                lst_liste.DataSource = RehberListesi;
            }
        }
        private void btn_yenikayit_Click(object sender, EventArgs e)
        {
            BusinessLogicLayer.BLL BLL = new BusinessLogicLayer.BLL();
            int ReturnValue            = BLL.KayitEkle(txt_y_isim.Text, txt_y_soyisim.Text, txt_y_telefonI.Text, txt_y_telefonII.Text, txt_y_telefonIII.Text, txt_y_emailadres.Text, txt_y_website.Text, txt_y_adres.Text, txt_y_aciklama.Text);

            if (ReturnValue > 0)
            {
                ListeDoldur();
                MessageBox.Show("Yeni Kayıt Eklendi.", "Bilgilendirme", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Beispiel #7
0
        private void btn_sifirla_Click(object sender, EventArgs e)
        {
            DialogResult sonuc = MessageBox.Show("Tüm İlerlemeyi Sıfırlamak İstediğinizden Emin misiniz ?", "Dikkat", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);

            if (sonuc == DialogResult.Yes)
            {
                BusinessLogicLayer.BLL bll = new BusinessLogicLayer.BLL();
                bll.Sifirla();
                _Istatistik();
            }
        }
        private void Doldur()
        {
            BusinessLogicLayer.BLL BLL   = new BusinessLogicLayer.BLL();
            List <Kelime>          liste = BLL.ListeleDurum("ogren");

            if (i == 0)
            {
                btn_geri.Enabled = false;
            }
            else
            {
                btn_geri.Enabled = true;
            }

            if (i == liste.Count)
            {
                btn_ileri.Enabled = false;
            }
            else
            {
                btn_ileri.Enabled = true;
            }

            if (ButonDurum == true)
            {
                i = i - 1;
            }
            else
            {
                i++;
            }

            if (i < liste.Count)
            {
                lbl_ogrenKelime.Text = liste[i].KelimeIngilizce;
                txt_ogrenAnlam.Text  = liste[i].KelimeTurkce;
                txt_ogrenTur.Text    = liste[i].Aciklama;
                txt_ogrnCumle.Text   = liste[i].Cumle;
            }
            else if (liste.Count == i)
            {
                btn_bitir.Enabled = true;
                if (ButonDurum == false)
                {
                    i++;
                }
                else if (ButonDurum == false)
                {
                    i--;
                }
                btn_bitir.Enabled = true;
            }
        }
        private void btn_sil_Click(object sender, EventArgs e)
        {
            Guid ID = ((Rehber)lst_liste.SelectedItem).ID;

            BusinessLogicLayer.BLL BLL = new BusinessLogicLayer.BLL();
            int Returnvalues           = BLL.KayitSil(ID);

            if (Returnvalues > 0)
            {
                ListeDoldur();
                MessageBox.Show("Kayıt Silindi.", "Bilgilendirme", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
        private void btn_düzenle_Click(object sender, EventArgs e)
        {
            Guid ID = ((Rehber)lst_liste.SelectedItem).ID;

            BusinessLogicLayer.BLL BLL = new BusinessLogicLayer.BLL();
            int ReturnValues           = BLL.KayitDüzenle(ID, txt_g_isim.Text, txt_g_soyisim.Text, txt_g_telefonI.Text, txt_g_telefonII.Text, txt_g_telefonIII.Text, txt_g_emailadres.Text, txt_g_website.Text, txt_g_adres.Text, txt_g_aciklama.Text);

            if (ReturnValues > 0)
            {
                ListeDoldur();
                MessageBox.Show("Kayıt Güncellendi.", "Bilgilendirme", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Beispiel #11
0
        private void btn_sil_Click(object sender, EventArgs e)
        {
            Guid ID = ((Rehber)lst_liste.SelectedItem).ID;

            BusinessLogicLayer.BLL BLL = new BusinessLogicLayer.BLL();
            int ReturnValues           = BLL.KayitSil(ID);

            if (ReturnValues > 0)
            {
                ListeDoldur();
                MessageBox.Show("Kaydınız Silinmiştir");
            }
        }
        private void btn_bitir_Click(object sender, EventArgs e)
        {
            BusinessLogicLayer.BLL BLL   = new BusinessLogicLayer.BLL();
            List <Kelime>          liste = BLL.ListeleDurum("ogren");

            for (int i = 0; i < liste.Count; i++)
            {
                BLL.KelimeDurumDuzenle(liste[i].KelimeID, "test");
                BLL.KelimeDereceDuzenle(liste[i].KelimeID, 0);
            }
            this.Hide();
            ////Test_ t =  Test_.Instance;
            ////t.Show();
        }
Beispiel #13
0
        private void btn_yenikayit_Click(object sender, EventArgs e)
        {
            BusinessLogicLayer.BLL BLL = new BusinessLogicLayer.BLL();
            int ReturnValue            = BLL.KayitEkle(txt_y_isim.Text, txt_y_soyisim.Text, txt_y_telefonI.Text,
                                                       txt_y_telefonII.Text, txt_y_telefonIII.Text, txt_y_email.Text,
                                                       txt_y_webadres.Text, txt_y_adres.Text, txt_y_aciklama.Text);

            if (ReturnValue > 0)
            {
                ListeDoldur();

                MessageBox.Show("Yeni Kayıt Eklendi");
            }
        }
        private void btnYeniKayit_Click(object sender, EventArgs e)
        {
            BusinessLogicLayer.BLL bll = new BusinessLogicLayer.BLL();
            int ReturnValue            = bll.KayitEkle(txtIsim.Text, txtSoyisim.Text, txtTelefonI.Text, txtTelefonII.Text, txtTelefonIII.Text, txtEmailAdres.Text, txtWebSite.Text, txtAdres.Text, txtAciklama.Text);

            if (ReturnValue > 0)
            {
                ListeDoldur();
                MessageBox.Show("Kaydınız başarılı bir şekilde eklendi", "Bilgilendirme", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                MessageBox.Show("Kayıt ekleme işleminde hata oluştu", "HATA", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        private void Btn_kayitDuzenle_Click(object sender, EventArgs e)
        {
            BusinessLogicLayer.BLL bLL = new BusinessLogicLayer.BLL();
            int ReturnValue            = bLL.SatisKaydiDuzenle(Convert.ToInt32(numUpD_d_ULC.Value), Convert.ToInt32(combo_d_isim.SelectedValue), Convert.ToInt32(numUpD_d_kamera.Value), Convert.ToInt32(numUpD_d_nvr.Value), Convert.ToInt32(numUpD_d_videoDuvar.Value), Convert.ToInt32(numUpD_d_isistasyonu.Value), Convert.ToInt32(numUpD_d_klavye.Value), dateTime_d_tarih.Value, txt_d_lisanskodu.Text, txt_d_donanimid.Text, txt_d_aciklama.Text);

            if (ReturnValue > 0)
            {
                MessageBox.Show("Kayıt düzenlendi.", "Bilgilendirme", MessageBoxButtons.OK, MessageBoxIcon.Information);
                yenile();
            }
            else
            {
                MessageBox.Show("Hatali giriş", "Hata", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
Beispiel #16
0
        private void btn_duzenle_Click(object sender, EventArgs e)
        {
            Guid ID = ((Rehber)lst_liste.SelectedItem).ID;

            BusinessLogicLayer.BLL BLL = new BusinessLogicLayer.BLL();
            int ReturnValues           = BLL.KayitDuzenle(ID, txt_g_isim.Text, txt_g_soyisim.Text, txt_g_telefonI.Text,
                                                          txt_g_telefonII.Text, txt_g_telefonIII.Text, txt_g_email.Text, txt_g_webadres.Text,
                                                          txt_g_adres.Text, txt_g_aciklama.Text);

            if (ReturnValues > 0)
            {
                ListeDoldur();
                MessageBox.Show("Kaydınız Güncellemiştir");
            }
        }
Beispiel #17
0
        private void btn_add_contact_Click(object sender, EventArgs e)
        {
            BusinessLogicLayer.BLL BLL = new BusinessLogicLayer.BLL();
            int ReturnValues           = BLL.addRecord(txt_new_name.Text, txt_new_surname.Text, txt_new_number1.Text, txt_new_number2.Text, txt_new_number3.Text, txt_new_email.Text, txt_new_webadress.Text, txt_new_adress.Text, txt_new_info.Text);

            if (ReturnValues > 0)
            {
                MessageBox.Show("Successful!! New Record Added", "Info", MessageBoxButtons.OK, MessageBoxIcon.Information);
                addList();
            }
            else
            {
                MessageBox.Show("Something wrong", "Info", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Beispiel #18
0
        private void btn_ekle_Click(object sender, EventArgs e)
        {
            BusinessLogicLayer.BLL bll = new BusinessLogicLayer.BLL();

            int returnValue = bll.KelimeEkle(txt_ekleKelime.Text, txt_ekleAnlam.Text, txt_ekleTur.Text, txt_ekleCumle.Text);

            if (returnValue > 0)
            {
                MessageBox.Show("Yeni Kayit Eklendi", "Bilgilendirme", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                MessageBox.Show("Kayıt Ekleme Başarısız", "Bilgilendirme", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        private void btn_secOgren_Click_1(object sender, EventArgs e)
        {
            BusinessLogicLayer.BLL BLL = new BusinessLogicLayer.BLL();
            Guid KelimeID = ((Kelime)listBox_sec.SelectedItem).KelimeID;

            BLL.KelimeDurumDuzenle(KelimeID, "ogren");
            listBox_sec.Items.Remove(listBox_sec.SelectedItem);

            if (listBox_sec.ItemCount == 0)
            {
                pnl_sec.Enabled = false;
                KelimeOgren ogr = KelimeOgren.Instance;
                ogr.BringToFront();
                ogr.Show();
            }
        }
        private void btnGuncelle_Click(object sender, EventArgs e)
        {
            BusinessLogicLayer.BLL bll = new BusinessLogicLayer.BLL();
            Rehber K           = (Rehber)lstListe.SelectedItem;
            int    ReturnValue = bll.KayitDüzenle(K.KullaniciID, txtIsim.Text, txtSoyisim.Text, txtTelefonI.Text, txtTelefonII.Text, txtTelefonIII.Text, txtEmailAdres.Text, txtWebSite.Text, txtAdres.Text, txtAciklama.Text);

            if (ReturnValue > 0)
            {
                MessageBox.Show("Kaydınız başarılı bir şekilde güncellendi", "Bilgilendirme", MessageBoxButtons.OK, MessageBoxIcon.Information);
                ListeDoldur();
            }
            else
            {
                MessageBox.Show("Kayıt güncelleme işleminde hata oluştu", "HATA", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Beispiel #21
0
        private void btn_delete_Click(object sender, EventArgs e)
        {
            Guid id = ((contacts)lst_list.SelectedItem).id;

            BusinessLogicLayer.BLL BLL = new BusinessLogicLayer.BLL();
            int ReturnValues           = BLL.deleteContact(id);

            if (ReturnValues > 0)
            {
                MessageBox.Show("Successful!! Record Deleted", "Info", MessageBoxButtons.OK, MessageBoxIcon.Information);
                addList();
            }
            else
            {
                MessageBox.Show("Something wrong", "Info", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Beispiel #22
0
        private void btn_update_Click(object sender, EventArgs e)
        {
            Guid id = ((contacts)lst_list.SelectedItem).id;

            BusinessLogicLayer.BLL BLL = new BusinessLogicLayer.BLL();
            int ReturnValues           = BLL.updateRecord(id, txt_update_name.Text, txt_update_surname.Text, txt_update_number1.Text, txt_update_number2.Text, txt_update_number3.Text, txt_update_email.Text, txt_new_webadress.Text, txt_update_adress.Text, txt_update_info.Text);

            if (ReturnValues > 0)
            {
                MessageBox.Show("Successful!! Record Updated", "Info", MessageBoxButtons.OK, MessageBoxIcon.Information);
                addList();
            }
            else
            {
                MessageBox.Show("Something wrong", "Info", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
        private void Btn_yeniKayit_Click(object sender, EventArgs e)
        {
            string hata = "";

            BusinessLogicLayer.BLL bLL = new BusinessLogicLayer.BLL();
            int ReturnValue            = bLL.SatisKaydiEkle(Convert.ToInt32(numUpD_y_ULC.Value), Convert.ToInt32(combo_y_isim.SelectedValue), combo_y_isim.Text, Convert.ToInt32(numUpD_y_kamera.Value), Convert.ToInt32(numUpD_y_nvr.Value), Convert.ToInt32(numUpD_y_videoDuvar.Value), Convert.ToInt32(numUpD_y_isistasyonu.Value), Convert.ToInt32(numUpD_y_klavye.Value), dateTime_y_tarih.Value, txt_y_lisanskodu.Text, txt_y_donanimid.Text, txt_y_aciklama.Text, out hata);

            if (ReturnValue > 0)
            {
                MessageBox.Show("Yeni kayıt eklendi", "Bilgilendirme", MessageBoxButtons.OK, MessageBoxIcon.Information);
                yenile();
            }
            else
            {
                MessageBox.Show("Hatali giriş", hata, MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
 private void Btn_satisKaydiSil_Click(object sender, EventArgs e)
 {
     BusinessLogicLayer.BLL bLL = new BusinessLogicLayer.BLL();
     if (MessageBox.Show("Silmek istediğinize emin misiniz?", "Bilgilendirme", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
     {
         int ReturnValue = bLL.SatisKaydiSil(Convert.ToInt32(numUpd_ks_ULC.Value));
         if (ReturnValue > 0)
         {
             MessageBox.Show("Kayıt başarıyla silindi.", "Bilgilendirme", MessageBoxButtons.OK, MessageBoxIcon.Information);
             yenile();
         }
         else
         {
             MessageBox.Show("Hatali giriş", "Bilgilendirme", MessageBoxButtons.OK, MessageBoxIcon.Warning);
         }
     }
 }
        private void btn_secBiliyorum_Click_1(object sender, EventArgs e)
        {
            int j = 0;

            BusinessLogicLayer.BLL BLL = new BusinessLogicLayer.BLL();
            Guid KelimeID = ((Kelime)listBox_sec.SelectedItem).KelimeID;

            BLL.KelimeDurumDuzenle(KelimeID, "test");
            BLL.KelimeDereceDuzenle(KelimeID, 0);
            listBox_sec.Items.Remove(listBox_sec.SelectedItem);
            j++;

            if (listBox_sec.ItemCount == 0)
            {
                pnl_sec.Enabled = false;
            }
        }
        private void ListeDoldur()
        {
            BusinessLogicLayer.BLL BLL           = new BusinessLogicLayer.BLL();
            List <Kelime>          KelimeListesi = BLL.ListeleDurum("NULL");

            if (KelimeListesi != null && KelimeListesi.Count > 9)
            {
                for (int i = 0; i < 10; i++)
                {
                    listBox_sec.Items.Add(KelimeListesi[i]);
                }
            }
            else if (KelimeListesi != null && KelimeListesi.Count > 0)
            {
                foreach (Kelime item in KelimeListesi)
                {
                    listBox_sec.Items.Add(item);
                }
            }
        }
        private void btnSil_Click(object sender, EventArgs e)
        {
            DialogResult SilmeIslemiCevap = MessageBox.Show("Silmek istediğinize emin misiniz ?", "UYARI", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);

            if (SilmeIslemiCevap == DialogResult.Yes)
            {
                BusinessLogicLayer.BLL bll = new BusinessLogicLayer.BLL();
                Guid SilinecekID           = ((Rehber)lstListe.SelectedItem).KullaniciID;
                int  ReturnValue           = bll.KayitSil(SilinecekID);
                if (ReturnValue > 0)
                {
                    ListeDoldur();
                    MessageBox.Show("Kaydınız başarılı bir şekilde silindi", "Bilgilendirme", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                else
                {
                    MessageBox.Show("Kayıt silme işleminde hata oluştu", "HATA", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }
Beispiel #28
0
        public List <Kelime> TesteYazdir()
        {
            BusinessLogicLayer.BLL BLL       = new BusinessLogicLayer.BLL();
            List <Kelime>          listdurum = BLL.ListeleDerece(0);
            int j = 1;

            while (j < 5)
            {
                BusinessLogicLayer.BLL Bll        = new BusinessLogicLayer.BLL();
                List <Kelime>          listDerece = Bll.ListeleDerece(j);
                for (int i = 0; i < listDerece.Count; i++)
                {
                    int fark = DateTime.Now.Day - listDerece[i].Tarih.Day;

                    if (j == 1 && fark >= 1)
                    {
                        listdurum.Add(listDerece[i]);
                    }
                    else if (j == 2 && fark >= 7)
                    {
                        listdurum.Add(listDerece[i]);
                    }
                    else if (j == 3 && fark >= 30)
                    {
                        listdurum.Add(listDerece[i]);
                    }
                    else if (j == 4 && fark >= 180)
                    {
                        listdurum.Add(listDerece[i]);
                    }
                    else
                    {
                        continue;
                    }
                }
                j++;
            }
            return(listdurum);
        }
Beispiel #29
0
        private void btn_ekle_Click(object sender, EventArgs e)
        {
            BusinessLogicLayer.BLL bll         = new BusinessLogicLayer.BLL();
            List <Kelime>          KelimeListe = bll.KelimeListele();


            if (KelimeListe != null)
            {
                for (int i = 0; i < KelimeListe.Count; i++)
                {
                    if (KelimeListe[i].KelimeIngilizce == txt_ekleKelime.Text)
                    {
                        durum = true;
                        break;
                    }
                }
            }

            if (durum == false)
            {
                bll.KelimeEkle(txt_ekleKelime.Text, txt_ekleAnlam.Text, txt_ekleTur.Text, txt_ekleCumle.Text);
                MessageBox.Show("Yeni Kayit Eklendi", "Bilgilendirme", MessageBoxButtons.OK, MessageBoxIcon.Information);
                txt_ekleKelime.Text = "";
                txt_ekleAnlam.Text  = "";
                txt_ekleTur.Text    = "";
                txt_ekleCumle.Text  = "";
            }
            else
            {
                MessageBox.Show("Kayıt Ekleme Başarısız. Aynı Kelimeden Bulunmaktadır.", "Bilgilendirme", MessageBoxButtons.OK, MessageBoxIcon.Error);
                txt_ekleKelime.Text = "";
                txt_ekleAnlam.Text  = "";
                txt_ekleTur.Text    = "";
                txt_ekleCumle.Text  = "";
                durum = false;
            }
        }
Beispiel #30
0
 public Form1()
 {
     InitializeComponent();
     bll = new BusinessLogicLayer.BLL();
 }