Beispiel #1
0
        private void MsjGonderButon_Click(object sender, EventArgs e) //ŞUBEYE MESAJ GÖNDERME BUTONU
        {
            if (MsjComboBox.SelectedIndex > -1)
            {
                E_Mesaj msj = new E_Mesaj();
                msj.SubeID = Convert.ToInt32(MsjComboBox.SelectedValue);
                msj.UyeTC  = Session.TC;
                msj.Konu   = MsjKonuTxtBox.Text;
                msj.Mesaj  = MsjMetniTxtBox.Text;

                int durum = BLL_Mesaj.MesajGonder(msj);
                if (durum == -1)
                {
                    MessageBox.Show("Yıldızlı alanların tümünü doldurunuz.", "Uyarı", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                else if (durum == 0)
                {
                    MessageBox.Show("Mesaj gönderilirken bir hata oluştu", "Uyarı", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                else
                {
                    MessageBox.Show("Mesaj başarıyla gönderildi.", "Bilgilendirme", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    MsjComboBox.SelectedIndex = -1;
                    MsjKonuTxtBox.Clear();
                    MsjMetniTxtBox.Clear();
                }
            }
        }
Beispiel #2
0
 void GecmisMesajlar()
 {
     GecmisMesajGridView.DataSource = null;
     GecmisMesajGridView.DataSource = BLL_Mesaj.UyeGecmisMesaj(Session.TC);
     GecmisMesajGridView.ClearSelection();
 }