Ejemplo n.º 1
0
    protected void Button2_Click(object sender, EventArgs e)
    {
        int mail_dogrula = 0;

        try
        {
            var veri = (from veriler in db.ayarlars where veriler.hno == Session["hno"].ToString() select veriler).First();

            if (CheckBox2.Checked == true)
            {
                mail_dogrula = 1;
            }
            else if (CheckBox2.Checked == false)
            {
                mail_dogrula = 0;
            }

            veri.mail_dogrula = mail_dogrula;
            db.SubmitChanges();
        }
        catch
        {
            ayarlar ayar = new ayarlar();


            if (CheckBox2.Checked == true)
            {
                mail_dogrula = 1;
            }
            else if (CheckBox2.Checked == false)
            {
                mail_dogrula = 0;
            }
            ayar.hno          = Session["hno"].ToString();
            ayar.mail_dogrula = mail_dogrula;
            db.ayarlars.InsertOnSubmit(ayar);
            db.SubmitChanges();
        }
    }
Ejemplo n.º 2
0
    protected void Button1_Click(object sender, EventArgs e)
    {
        string _ip = TextBox1.Text;

        try
        {
            var ip_veri = (from veriler in db.IPs where veriler.hno == Session["hno"].ToString() select veriler).First();

            ip_veri.hno = Session["hno"].ToString();
            ip_veri.IP1 = _ip;
            db.SubmitChanges();
        }

        catch
        {
            IP ipler = new IP();
            ipler.hno = Session["hno"].ToString();
            ipler.IP1 = _ip;
            db.IPs.InsertOnSubmit(ipler);
            db.SubmitChanges();
        }



        try
        {
            var veri = (from veriler in db.ayarlars where veriler.hno == Session["hno"].ToString() select veriler).First();

            int ip_dogrula = 0;
            if (CheckBox1.Checked == true)
            {
                ip_dogrula = 1;
            }
            else if (CheckBox1.Checked == false)
            {
                ip_dogrula = 0;
            }
            veri.hno        = Session["hno"].ToString();
            veri.ip_dogrula = ip_dogrula;

            db.SubmitChanges();
        }
        catch
        {
            int ip_dogrula = 0;
            if (CheckBox1.Checked == true)
            {
                ip_dogrula = 1;
            }
            else if (CheckBox1.Checked == false)
            {
                ip_dogrula = 0;
            }

            ayarlar ayar = new ayarlar();
            ayar.hno        = Session["hno"].ToString();
            ayar.ip_dogrula = ip_dogrula;

            db.ayarlars.InsertOnSubmit(ayar);
            db.SubmitChanges();
        }
    }
Ejemplo n.º 3
0
        private void menu_buton_Click(object sender, EventArgs e)
        {
            string isim = "";
            int    buton_no;

            BunifuFlatButton genel = (sender as BunifuFlatButton);

            isim     = genel.Name;
            buton_no = Convert.ToInt16(isim.Substring(4, 2));

            footer_metin_bilgileri();

            if (buton_no == 1)
            {
                //Sakın Silme !!
                //pl_icerik.Controls.Clear();
                //pl_icerik.Controls.Add(pl_nelervar);

                //pl_nelervar.Location = new Point(
                // pl_icerik.ClientSize.Width / 2 - pl_nelervar.Size.Width / 2,
                //pl_icerik.ClientSize.Height / 2 - pl_nelervar.Size.Height / 2);
                //pl_nelervar.Anchor = AnchorStyles.None;

                //pl_nelervar.Controls.Clear();//formun içini temizliyoruz..
                //neler_sunuyoruz newForm = new neler_sunuyoruz();
                //newForm.TopLevel = false;
                //pl_nelervar.Controls.Add(newForm);
                //newForm.Dock = DockStyle.Fill;
                //newForm.Show();

                alarm.Show("Ana sayfa çok yakında.", alarm.Alarmtur.basarili);
            }
            else if (buton_no == 2)
            {
                pl_icerik.Controls.Clear();//formun içini temizliyoruz..
                masa_butonlari newForm = new masa_butonlari(pl_icerik);
                newForm.TopLevel = false;
                pl_icerik.Controls.Add(newForm);
                newForm.Dock = DockStyle.Fill;
                newForm.Show();
            }
            else if (buton_no == 3)
            {
                personel_giris giris = new personel_giris("yonetici", false);
                giris.ShowDialog();

                if (cGenel.personel_girisi == true)
                {
                    pl_icerik.Controls.Clear();//formun içini temizliyoruz..
                    urunler newForm = new urunler();
                    newForm.TopLevel = false;
                    pl_icerik.Controls.Add(newForm);
                    newForm.Dock = DockStyle.Fill;
                    newForm.Show();
                }
                else
                {
                    alarm.Show("Bu sayfayı görme yetkiniz yok.", alarm.Alarmtur.hata);
                }
            }
            else if (buton_no == 4)
            {
                pl_icerik.Controls.Clear();//formun içini temizliyoruz..
                Sonislemler newForm = new Sonislemler();
                newForm.TopLevel = false;
                pl_icerik.Controls.Add(newForm);
                newForm.Show();
                newForm.Dock = DockStyle.Fill;
            }
            else if (buton_no == 5)
            {
                personel_giris giris = new personel_giris("yonetici", false);
                giris.ShowDialog();

                if (cGenel.personel_girisi == true)
                {
                    pl_icerik.Controls.Clear();//formun içini temizliyoruz..
                    personel newForm = new personel();
                    newForm.TopLevel = false;
                    pl_icerik.Controls.Add(newForm);
                    newForm.Show();
                    newForm.Dock = DockStyle.Fill;
                }
                else
                {
                    alarm.Show("Bu sayfayı görme yetkiniz yok.", alarm.Alarmtur.hata);
                }
            }
            //Hesap Defteri
            else if (buton_no == 6)
            {
                if (ayarlar.internet_var_mi())
                {//internet bağlantısı var ise çalışacak. (Baslangic)
                    personel_giris giris = new personel_giris("yonetici", true);
                    giris.ShowDialog();

                    if (cGenel.personel_girisi == true)
                    {
                        pl_icerik.Controls.Clear();//formun içini temizliyoruz..
                        hesapdefteri newForm = new hesapdefteri();
                        newForm.TopLevel = false;
                        pl_icerik.Controls.Add(newForm);
                        newForm.Show();
                        newForm.Dock = DockStyle.Fill;
                    }//internet bağlantısı var ise çalışacak. (Son)
                    else
                    {
                        alarm.Show("Bu sayfayı görme yetkiniz yok.", alarm.Alarmtur.hata);
                    }
                }
                else
                {//internet bağlantısı yok ise çalışacak.
                    MessageBox.Show("Lütfen internet bağlantınızı kontrol edin.");
                }
            }

            //Raporlar (buton_no == 7)
            else if (buton_no == 7)
            {
                if (ayarlar.internet_var_mi())
                { //İnternet bağlantısı var ise çalışacak. (Baslangic)
                    personel_giris giris = new personel_giris("yonetici", true);
                    giris.ShowDialog();

                    if (cGenel.personel_girisi == true)
                    {
                        pl_icerik.Controls.Clear();//formun içini temizliyoruz..
                    }
                    else
                    {
                        alarm.Show("Bu sayfayı görme yetkiniz yok.", alarm.Alarmtur.hata);
                    }
                }//internet bağlantısı var ise (SON)
                else
                {//internet bağlantısı yok ise çalışacak.
                    MessageBox.Show("Lütfen internet bağlantınızı kontrol edin.");
                }
            }
            else if (buton_no == 8)
            {
                personel_giris giris = new personel_giris("yonetici", false);
                giris.ShowDialog();

                if (cGenel.personel_girisi == true)
                {
                    pl_icerik.Controls.Clear();//formun içini temizliyoruz..
                    ayarlar newForm = new ayarlar();
                    newForm.TopLevel = false;
                    pl_icerik.Controls.Add(newForm);
                    newForm.Show();
                    newForm.Dock = DockStyle.Fill;
                }
                else
                {
                    alarm.Show("Bu sayfayı görme yetkiniz yok.", alarm.Alarmtur.hata);
                }
            }
            //Son işlemler kısımını güncelliyoruz
            veritabani.Sonislem_getir(lv_sonislemler);
            foreach (ListViewItem item in lv_sonislemler.Items)
            {
                item.BackColor = item.Index % 2 == 0 ? Color.White : Color.MistyRose;
            }
        }