private void BtnKaydet_Click(object sender, EventArgs e)
        {
            if (TxtAd.Text.Length > 20 || TxtAciklama.Text == "" || TxtAd.Text == "")
            {
                MessageBox.Show("Bu hatayı alıyorsanız:\n\n" +
                                "1- 20'den fazla karakter girilmiş,\n" +
                                "2- Doldurulması gereken bir alan boş bırakılmış,\n\n" +
                                "Olabilir.\n\n" +
                                "LUTFEN BU KURALLARA UYARAK TEKRAR İŞLEM YAPINIZ..", "Hata", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else
            {
                TBLDEPARTMAN t = new TBLDEPARTMAN();

                t.AD       = TxtAd.Text;
                t.ACIKLAMA = TxtAciklama.Text;

                db.TBLDEPARTMAN.Add(t);
                db.SaveChanges();

                MessageBox.Show("Departman Başarıyla Kaydedildi", "Bilgilendirme", MessageBoxButtons.OK, MessageBoxIcon.Information);

                PubDepartmanListesiTimer.Enabled = true;
                FrmPersonelListesi.PubPesonelListesiTimer.Enabled = true;//Bu ekleme işlemi personel listesindeki lookupediti etikiliyor o yuzde personel listesinin timerını çalıştırdım
                DepartmanListesiDegisiklikSayac++;
            }
        }
        private void BtnKaydet_Click(object sender, EventArgs e)
        {
            if (TxtAd.Text.Length > 20 || TxtAciklama.Text == "" || TxtAd.Text == "")
            {
                MessageBox.Show("Bu hatayı alıyorsanız:\n\n" +
                                "1- 20'den fazla karakter girilmiş,\n" +
                                "2- Doldurulması gereken bir alan boş bırakılmış,\n\n" +
                                "Olabilir.\n\n" +
                                "LUTFEN BU KURALLARA UYARAK TEKRAR İŞLEM YAPINIZ..", "Hata", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else
            {
                TBLDEPARTMAN t = new TBLDEPARTMAN();

                t.AD       = TxtAd.Text;
                t.ACIKLAMA = TxtAciklama.Text;

                db.TBLDEPARTMAN.Add(t);
                db.SaveChanges();

                MessageBox.Show("Departman Başarıyla Kaydedildi", "Bilgilendirme", MessageBoxButtons.OK, MessageBoxIcon.Information);

                YeniDepartmanDegisiklikSayac++;//Diger formda burda değişiklik yapılmışmı kontrol etmek icins sayac
                Formlar.FrmDepartmanListesi.PubDepartmanListesiTimer.Enabled = true;
                //UrunListesi fomrundaki timerı calıştırıyor ki çalışınca liste guncellensin
            }
        }
Exemplo n.º 3
0
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            TBLDEPARTMAN d = new TBLDEPARTMAN();

            d.AD = txtAd.Text;
            db.TBLDEPARTMAN.Add(d);
            db.SaveChanges();
            MessageBox.Show("Departman" +
                            " Başarıyla Kaydedildi.", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
        private void btnkaydet_Click(object sender, EventArgs e)
        {
            TBLDEPARTMAN dp = new TBLDEPARTMAN();

            if (txtad.Text.Length <= 50 && txtad.Text != "" && richTextBox1.Text.Length >= 1)
            {
                dp.AD       = txtad.Text;
                dp.ACIKLAMA = richTextBox1.Text;
                db.TBLDEPARTMAN.Add(dp);
                db.SaveChanges();
                MessageBox.Show("kayıt eklendi");
            }
        }
        private void btnkaydet_Click(object sender, EventArgs e)
        {
            TBLDEPARTMAN dp = new TBLDEPARTMAN();

            if (txtdptad.Text.Length <= 50 && txtdptad.Text != "")
            {
                dp.AD = txtdptad.Text;
                db.TBLDEPARTMAN.Add(dp);
                db.SaveChanges();
                MessageBox.Show("kayıt eklendi");
            }
            else
            {
                MessageBox.Show("Tekrar Deneyin");
            }
        }
Exemplo n.º 6
0
        private void BtnKaydet_Click(object sender, EventArgs e)
        {
            TBLDEPARTMAN t = new TBLDEPARTMAN();

            if (TxtAd.Text.Length <= 50 && TxtAd.Text != "")
            {
                t.AD = TxtAd.Text;
                db.TBLDEPARTMAN.Add(t);
                db.SaveChanges();
                MessageBox.Show("Departman Kaydedildi!", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                MessageBox.Show("Kayıt Yapılamadı!", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemplo n.º 7
0
        private void BtnKaydet_Click(object sender, EventArgs e)
        {
            TBLDEPARTMAN d = new TBLDEPARTMAN();

            if (TxtDepartmanAd.Text.Length <= 50 && TxtDepartmanAd.Text != null)
            {
                d.AD = TxtDepartmanAd.Text;
                db.TBLDEPARTMAN.Add(d);
                db.SaveChanges();
                MessageBox.Show("Deparman Ekleme İşlemi Başarılı", "BİLGİ", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                MessageBox.Show("Deparman Alanınnı Lütfen Kontrol Ediniz!", "BİLGİ", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
Exemplo n.º 8
0
        private void btnKaydet_Click(object sender, EventArgs e)
        {
            TBLDEPARTMAN d = new TBLDEPARTMAN();

            if (txtAd.Text.Length <= 50 && txtAd.Text != "" && richTextBox1.Text.Length >= 1)
            {
                d.AD = txtAd.Text;
                //d.ACIKLAMA = richTextBox1.Text;
                db.TBLDEPARTMAN.Add(d);
                db.SaveChanges();
                MessageBox.Show("Departman Kaydedildi", "Bilgi", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                MessageBox.Show("Kayıt yapılamadı", "Hata", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemplo n.º 9
0
        private void BtnKaydet_Click(object sender, EventArgs e)
        {
            TBLDEPARTMAN k = new TBLDEPARTMAN();

            try
            {
                k.AD       = TxtAdi.Text.ToUpper();;
                k.ACIKLAMA = RchAcıklama.Text.ToUpper();
                db.TBLDEPARTMAN.Add(k);
                db.SaveChanges();
                MessageBox.Show("Deparman Kayıt İşleminiz Başarılı", "BİLGİ", MessageBoxButtons.OK, MessageBoxIcon.Information);
                metot();
            }
            catch (Exception)
            {
                MessageBox.Show(" Departman Adını Düzenleyin", "UYARI", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }