Exemplo n.º 1
0
 private void BtnGiden_Click(object sender, EventArgs e)
 {
     MesajlarBolgesi.Visible = true;
     MesajBasligi.Visible    = false;
     yanitlaid = 0;
     Silmeid   = 0;
     PK        = "";
     richTextBox1.Clear();
     richTextBox2.Clear();
     bunifuFlatButton7.Text = " KİŞİ SEÇ";
     MesajlarGosterdata.Rows.Clear();
     try
     {
         using (seckinumurEntities db = new seckinumurEntities())
         {
             VeriAl al = new VeriAl(Kullaniciid);
             int    i  = 0;
             foreach (var m in al.gidenmesajlar())
             {
                 Kullanicilars GonderilenKisisi = new Kullanicilars();
                 int           gonderilenid     = m.KullanicilarID;
                 GonderilenKisisi = db.Kullanicilars.Where(p => p.KullanicilarID == gonderilenid).FirstOrDefault();
                 MesajlarGosterdata.Rows.Add();
                 MesajlarGosterdata.Rows[i].Cells[0].Value = m.GidenMesajlarID;
                 MesajlarGosterdata.Rows[i].Cells[1].Value = GonderilenKisisi.Adi;
                 MesajlarGosterdata.Rows[i].Cells[2].Value = "GI";
                 i++;
             }
         }
     }
     catch
     {
         MessageBox.Show("Mesaj Yok!");
     }
 }
Exemplo n.º 2
0
        private void AnaForm_Load(object sender, EventArgs e)
        {
            // TODO: This line of code loads data into the 'seckinumurDataSet1.Kullanicilars' table. You can move, or remove it, as needed.
            this.kullanicilarsTableAdapter1.Fill(this.seckinumurDataSet1.Kullanicilars);
            this.kullanicilarsTableAdapter.Fill(this.seckinumurDataSet.Kullanicilars);

            try
            {
                bunifuCustomDataGrid1.Refresh();
                Kisisecdata.Refresh();
                OS = new OnlineSistemi(Kullaniciid);
                VeriAl al = new VeriAl(Kullaniciid);
                KisiİsmiYeri.LabelText = al.kisi.Adi;
                SifreAl.Text           = al.kisi.Sifresi;
                BtnGelen.Text          = " GELEN KUTUSU  (" + al.GelenMesajAdedi().ToString() + ")";
                BtnGiden.Text          = " GİDEN KUTUSU  (" + al.GidenMesajAdedi().ToString() + ")";
                BtnSilinenler.Text     = " SİLİNENLER          (" + al.SilinenMesajAdedi().ToString() + ")";
                timer1.Interval        = 1000;
                timer1.Start();
            }
            catch
            {
                this.Close();
                girisFormu.Visible                    = true;
                girisFormu.ProgressBar.Visible        = true;
                girisFormu.HataMesaji.Visible         = true;
                girisFormu.BtnTekarDene.Visible       = true;
                girisFormu.kullaniciAdiAl.Visible     = false;
                girisFormu.SifreAl.Visible            = false;
                girisFormu.bunifuCustomLabel2.Visible = false;
                girisFormu.bunifuCustomLabel1.Visible = false;
                girisFormu.bunifuCustomLabel3.Visible = false;
                girisFormu.bunifuSeparator1.Visible   = false;
                girisFormu.bunifuSeparator2.Visible   = false;
                girisFormu.Giris1.Visible             = false;
                girisFormu.KayitOl.Visible            = false;
                girisFormu.timer1.Interval            = 100;
                girisFormu.timer1.Start();
                MessageBox.Show("İnternet Bağlantısı Kesildi!\n İnternete Bağlanıp Yeniden Giriş Yapın!", "HATA");
            }
        }