//File.Move(openFileDialog1.FileName,sDialog.FileName); private void btnIstenCikar_Click(object sender, EventArgs e) { DialogResult dr = MessageBox.Show("İşten çıkarmak istediğinize emin misiniz?", this.Text, MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button3); if (dr == DialogResult.Yes) { if (MamiKatmanı.istenCikar(Personel)) { MessageBox.Show("İşten çıkarma başarılı", this.Text); } else { MessageBox.Show("İşten çıkarma başarısız."); } } }
private void Ara_Click(object sender, EventArgs e) { string Ad = txtAd.Text; if (Ad == "") { MessageBox.Show("Hata! Ad alanı boş geçilemez", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Hand); } DataTable dt = MamiKatmanı.Search(Ad); if (Ad != null) { dtgSearchResult.DataSource = dt; } else { MessageBox.Show("Kayıt bulunamadı", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void btnGiris_Click(object sender, EventArgs e) { string kullaniciAdi = txtKullaniciAdi.Text; string sifre = txtSifre.Text; tblKullanicilar k; if ((k = MamiKatmanı.Login(kullaniciAdi, sifre)) != null) { Kullanici = k; MessageBox.Show("Giriş Başarılı", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information); Form frmAnaMenü = new frmParent(); frmAnaMenü.Show(); this.Hide(); } else { MessageBox.Show("Kullanıcı adı veya şifre hatalı!", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void btnDuzenle_Click(object sender, EventArgs e) { if (dtgSearchResult.SelectedRows.Count > 0) { int personelID = Convert.ToInt32(dtgSearchResult.SelectedRows[0].Cells["ID"]); tblPersoneller p = MamiKatmanı.PersonelDetails(personelID); string kullaniciAdi = MamiKatmanı.userName(personelID); frmPersonelKayitDuzenleme.Personel_kullaniciAdı = kullaniciAdi; frmPersonelKayitDuzenleme.formTuru = frmPersonelKayitDuzenleme.efromTuru.Duzenleme; Form frmDuzenle = new frmPersonelKayitDuzenleme(); frmDuzenle.MdiParent = Application.OpenForms[1]; frmDuzenle.WindowState = FormWindowState.Maximized; frmDuzenle.Show(); this.Close(); } else { MessageBox.Show("Lütfen personel seçiniz..", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
private void btnKaydet_Click(object sender, EventArgs e) { try { if (MamiKatmanı.Save(Personel)) { for (int i = 0; i < tabcEkranlar.TabPages.Count; i++) { ((Button)((tabcEkranlar.TabPages[0].Controls[0]).Controls["btnKaydet"])).PerformClick(); } MessageBox.Show("Kaydetme başarılı.", this.Text); } else { MessageBox.Show("Kaydetme başarısız.", this.Text); } }catch (Exception ex) { MessageBox.Show(ex.Message); } }