Ejemplo n.º 1
0
        private void PictureBox2_Click(object sender, EventArgs e)
        {
            Musteri m = HelperMusteri.GetById(ma.MusteriId);

            m.Ad    = textBox1.Text;
            m.Soyad = textBox2.Text;
            m.Tel   = textBox3.Text;
            m.Adres = textBox4.Text;
            var a = HelperMusteri.Update(m);

            if (a.Item2)
            {
                MessageBox.Show("Güncelleme işlemi başarıyla gerçekleştirildi.", "Bilgilendirme", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.Close();
            }
            else
            {
                MessageBox.Show("Güncelleme işlemi gerçekleştirilemedi.", "Bilgilendirme", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Ejemplo n.º 2
0
        private void PictureBox4_Click(object sender, EventArgs e)
        {
            var b = MessageBox.Show("Bu kaydı silmek istediğinizden emin misiniz?", "Bilgilendirme", MessageBoxButtons.YesNo, MessageBoxIcon.Information);

            if (b == DialogResult.Yes)
            {
                var a = HelperMusteri.GetById(Convert.ToInt32(dataGridView1.Rows[dataGridView1.CurrentRow.Index].Cells[0].Value));
                a.AktifMi = true;
                var c = HelperMusteri.Update(a);
                if (c.Item2)
                {
                    DatabaseYenile();
                    MessageBox.Show("Kayıt başarıyla silindi.", "Bilgilendirme", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                else
                {
                    MessageBox.Show("Kayıt silinemedi.", "Bilgilendirme", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
            else
            {
                MessageBox.Show("Kayıt silme iptal edildi.", "Bilgilendirme", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Ejemplo n.º 3
0
        private void PictureBox5_Click(object sender, EventArgs e)
        {
            Form2 f = new Form2(HelperMusteri.GetById(Convert.ToInt32(dataGridView1.Rows[dataGridView1.CurrentRow.Index].Cells[0].Value)), 1);

            f.Show();
        }