Exemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            Personel personel = null;

            try
            {
                personel = ctx.Personels.Where(p => p.Kimlik == textBox_kimlikNo.Text).Select(p => p).Single();
            }
            catch (Exception) {}

            if (personel == null)
            {
                toolStripStatusLabel_bilgi.Text = "Personel bulunamadı";
            }
            else
            {
                Form_Personel form;
                if (this.Text == "Personel Sil")
                {
                    form = new Form_Personel(personel, false);
                }
                else
                {
                    form = new Form_Personel(personel, true);
                }
                form.MdiParent = this.MdiParent;
                form.Show();
                this.Close();
            }
        }
Exemplo n.º 2
0
        private void personelEkleToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form_Personel personel = new Form_Personel();

            if (Form_Personel.FormAcik)
            {
                FormuOneGetir(personel);
            }

            else
            {
                personel.MdiParent = this;
                personel.Show();
            }
        }