private void btnIptalEt_Click(object sender, EventArgs e) { bool dogruMu = KullaniciGirdisiDogrula(); if (!dogruMu) { return; } bool sonuc = false; //servis çağrılıyor. try { sonuc = ISK.Seans.IptalEt(seans); } catch (Exception ex) { Yardimci.HataKaydet(ex); MessageBox.Show("Serviste bir hata oluştu!"); } if (sonuc) { MessageBox.Show("Seans iptal edildi."); } else { MessageBox.Show("Oluşan bir hata nedeniyle seans iptal edilemedi!"); } this.Close(); }
private void btnKaydet_Click(object sender, EventArgs e) { bool dogruMu = KullaniciGirdisiDogrula(); bool sonuc = false; if (!dogruMu) { return; } //servis çağrılıyor. try { seans.HastaNo = hasta.No; sonuc = ISK.Seans.RandevuKaydet(seans.No, hasta.No); } catch (Exception ex) { Yardimci.HataKaydet(ex); MessageBox.Show("Serviste bir hata oluştu!"); } if (sonuc) { MessageBox.Show("Kayıt işlemi tamamlandı."); this.Close(); } else { MessageBox.Show("İşlem hatalı!"); } }
private void btnSifirla_Click(object sender, EventArgs e) { bool dogruMu = KullaniciGirdisiDogrula(); if (!dogruMu) { return; } //servis çağrılıyor. bool sonuc = false; try { sonuc = ISK.Calisan.ParolaSifirla(txtEPosta.Text, txtParola.Text); } catch (Exception ex) { Yardimci.HataKaydet(ex); MessageBox.Show("Serviste bir hata oluştu!"); } if (sonuc) { MessageBox.Show("Parola sıfırlandı."); } else { MessageBox.Show("İşlem gerçekleştirilirken bir hata oluştu!"); } }
private void btnDegistir_Click(object sender, EventArgs e) { bool dogruMu = KullanciGirdisiDogrula(); if (!dogruMu) { return; } //servis çağrılıyor. bool sonuc = false; try { sonuc = ISK.Calisan.ParolaDegistir(calisan.No, txtYeni1.Text); } catch (Exception ex) { Yardimci.HataKaydet(ex); MessageBox.Show("Serviste bir hata oluştu!"); } if (sonuc) { MessageBox.Show("Parola değiştirildi."); this.Close(); } else { MessageBox.Show("İşlem gerçekleştirilirken bir hata oluştu!"); } }
private void BilgileriYukle() { if (hasta != null) { //hasta bilgileri yükleniyor. lblAd.Text = hasta.Ad; lblAdres.Text = hasta.Soyad; lblGsmNo.Text = hasta.CepTel; lblCinsiyet.Text = hasta.Cinsiyeti; lblDogumTarihi.Text = hasta.DogumTarihi.ToShortDateString(); lblEPosta.Text = hasta.Eposta; lblTelefon.Text = hasta.EvTel; lblSoyad.Text = hasta.Soyad; lblTCKimlikNo.Text = hasta.TCKimlikNo; //aktif seans notunu yükle. txtAktifSeansNotu.Text = aktifSeans.SeansNotu; VAR.Seans[] hastaSeanslari = null; //hasta seans geçmişi yükleniyor. //servis çağrılıyor. try { hastaSeanslari = ISK.Seans.HastaSeanslariniListele(hasta.No); } catch (Exception ex) { Yardimci.HataKaydet(ex); MessageBox.Show("Serviste bir hata oluştu!"); } lstSeanslar.DataSource = hastaSeanslari; lstSeanslar.DisplayMember = "GoruntuMetni"; } }
private void UzmanSeanslariniYukle() { VAR.Seans[] seanslar = null; //servis çağrılıyor. try { seanslar = ISK.Seans.UzmanSeanslariniListele(uzman.No); } catch (Exception ex) { Yardimci.HataKaydet(ex); MessageBox.Show("Seviste bir hata oluştu!"); } lstSeanslar.DataSource = seanslar; lstSeanslar.DisplayMember = "GoruntuMetni"; if (lstSeanslar.Items.Count > 0 && lstSeanslar.SelectedIndex > -1) { lnkSeansIptalEt.Enabled = true; } else { lnkSeansIptalEt.Enabled = false; } }
private void UzmanlariYukle() { VAR.Calisan[] uzmanlar = null; // servis çağırılıyor try { uzmanlar = ISK.Calisan.UzmanlariListele(); } catch (Exception ex) { Yardimci.HataKaydet(ex); MessageBox.Show("Serviste bir hata oluştu!"); } cbbUzmanlar.DataSource = uzmanlar; cbbUzmanlar.DisplayMember = "GoruntuMetni"; }
private void UzmanSeanslariniYukle() { VAR.Seans[] seanslar = null; //servis çağrılıyor. try { seanslar = ISK.Seans.UzmanSeanslariniListele(uzman.No); } catch (Exception ex) { Yardimci.HataKaydet(ex); MessageBox.Show("Seviste bir hata oluştu!"); } cbbSeanslar.DataSource = seanslar; cbbSeanslar.DisplayMember = "GoruntuMetni"; }
private void FormUzmanSeansYonetimi_Load(object sender, EventArgs e) { EkraniTemizle(); //servis çağrılıyor. try { uzman = ISK.Calisan.CalisanGetir(Yardimci.KullaniciNo); } catch (Exception ex) { Yardimci.HataKaydet(ex); MessageBox.Show("Serviste bir hata oluştu!"); } UzmanSeanslariniYukle(); }
private bool SeansNotuKaydet(int seansNo, string seansNotu) { bool sonuc = false; try { sonuc = ISK.Seans.NotGuncelle(seansNo, seansNotu); } catch (Exception ex) { Yardimci.HataKaydet(ex); MessageBox.Show("Serviste bir hata oluştu!"); } return(sonuc); }
private void btnKaydet_Click(object sender, EventArgs e) { bool dogruMu = KullaniciGirdisiDogrula(); if (!dogruMu) { return; } // yeni kayıtsa, yeni bir calisan nesnesi oluşturuluyor. if (hasta == null) { hasta = new SISVarliklar.Hasta(); } hasta.Ad = txtAd.Text; hasta.Adres = txtAdres.Text; hasta.CepTel = txtGsmNo.Text; hasta.Cinsiyeti = cbbCinsiyet.Items[cbbCinsiyet.SelectedIndex].ToString(); hasta.DogumTarihi = dtpDogumTarihi.Value; hasta.Eposta = txtEPosta.Text; hasta.EvTel = txtTelefon.Text; hasta.Soyad = txtSoyad.Text; hasta.TCKimlikNo = txtKimlikNo.Text; int sonuc = 0; //servis çağrılıyor. try { sonuc = ISK.Hasta.Kaydet(hasta); } catch (Exception ex) { Yardimci.HataKaydet(ex); MessageBox.Show("Serviste bir hata oluştu!"); } if (sonuc > 0) { MessageBox.Show("Kayıt işlemi tamamlandı."); this.Close(); } else { MessageBox.Show("İşlem hatalı!"); } }
private void btnKaydet_Click(object sender, EventArgs e) { bool dogruMu = KullaniciGirdisiDogrula(); if (!dogruMu) { return; } //yeni kayıtsa, yeni bir calışan nesnesi olusturuluyor. if (calisan == null) { calisan = new SISVarliklar.Calisan(); } calisan.Ad = txtAd.Text; calisan.Soyad = txtSoyad.Text; calisan.TCKimlikNo = txtKimlikNo.Text; calisan.CalisanTipi = VAR.Calisan.CalisanTipleri.Sekreter; calisan.CepTel = txtGsmNo.Text; calisan.Eposta = txtEPosta.Text; calisan.EvTel = txtTelefon.Text; int sonuc = 0; //servis çağrılıyor. try { sonuc = ISK.Calisan.Kaydet(calisan); } catch (Exception ex) { Yardimci.HataKaydet(ex); MessageBox.Show("Serviste bir hata oluştu!"); } if (sonuc > 0) { MessageBox.Show("Kayıt işlemi tamamlandı."); this.Close(); } else { MessageBox.Show("İşlem hatalı!"); } }
private void btnKaydet_Click(object sender, EventArgs e) { bool dogruMu = KullanciGirdisiDogrula(); if (!dogruMu) { return; } VAR.Seans seans = new SISVarliklar.Seans(); seans.UzmanNo = uzman.No; seans.Tarih = dtpTarih.Value; seans.BaslangicSaati = dtpBaslangicSaati.Value.ToShortTimeString(); seans.BitisSaati = dtpBitisSaati.Value.ToShortTimeString(); int sonuc = 0; //servis çağrılıyor. try { sonuc = ISK.Seans.Kaydet(seans); } catch (Exception ex) { Yardimci.HataKaydet(ex); MessageBox.Show("Serviste bir hata oluştu!"); } if (sonuc > 0) { MessageBox.Show("Kayıt işlemi tamamlandı."); this.Close(); } else if (sonuc == -1) { MessageBox.Show("Seans saatlerinde çakışma var!"); } else { MessageBox.Show("İşlem hatalı!"); } }
private void CalisanlariListele() { VAR.Calisan[] calisanlar = null; lstCalisanlar.DisplayMember = "GoruntuMetni"; //servis çağrılıyor. try { calisanlar = ISK.Calisan.CalisanlariListele(txtAd.Text, txtSoyad.Text); } catch (Exception ex) { Yardimci.HataKaydet(ex); MessageBox.Show("Serviste bir hata oluştu!"); } finally { lstCalisanlar.DataSource = calisanlar; } }
private void HastalariListele() { lstHastalar.DisplayMember = "GoruntuMetni"; VAR.Hasta[] hastalar = null; //servis çağrılıyor. try { hastalar = ISK.Hasta.HastalariListele(txtAd.Text, txtSoyad.Text); } catch (Exception ex) { Yardimci.HataKaydet(ex); MessageBox.Show("Serviste bir hata oluştu!"); } finally { lstHastalar.DataSource = hastalar; } }
private void RandevuBilgisiYukle() { RandevuBilgisiTemizle(); //servis çağrılıyor. try { sonRandevu = ISK.Seans.SonRandevuBilgisiGetir(hasta.No); } catch (Exception ex) { Yardimci.HataKaydet(ex); MessageBox.Show("Serviste bir hata oluştu!"); } if (sonRandevu != null) { lblRandevuSeans.Text = sonRandevu.GoruntuMetni; lblRandevuUzman.Text = sonRandevu.UzmanBilgisi; lnkRandevuIptalEt.Enabled = true; } else { lnkYeniRandevu.Enabled = true; } //servis çağrılıyor. try { sonSeans = ISK.Seans.SonSeansBilgisiGetir(hasta.No); } catch (Exception ex) { Yardimci.HataKaydet(ex); MessageBox.Show("Serviste bir hata oluştu!"); } if (sonSeans != null) { lblSeansUzman.Text = sonSeans.UzmanBilgisi; lblSeansSeans.Text = sonSeans.GoruntuMetni; lblSeansNot.Text = sonSeans.SeansNotu; } }
private void btnGir_Click(object sender, EventArgs e) { //kullanıcı girişi doğrulama if (string.IsNullOrEmpty(txtKullanici.Text)) { MessageBox.Show("Kullanıcı bilgisini boş geçemezsiniz."); txtKullanici.SelectAll(); txtKullanici.Focus(); return; } if (string.IsNullOrEmpty(txtParola.Text)) { MessageBox.Show("Parola bilgisini boş geçemezsiniz."); txtParola.SelectAll(); txtParola.Focus(); return; } int calisanNo = 0; //servis çağrılıyor. try { calisanNo = ISK.Calisan.KullaniciGirisiniDogrula(txtKullanici.Text, txtParola.Text); } catch (Exception ex) { Yardimci.HataKaydet(ex); MessageBox.Show("Serviste bir hata oluştu."); } if (calisanNo > 0) { Yardimci.KullaniciNo = calisanNo; this.Close(); } else { MessageBox.Show("Hatalı kullanıcı/Parola bilgisi!"); txtKullanici.SelectAll(); txtKullanici.Focus(); } }
private void cbbSeanslar_SelectedIndexChanged(object sender, EventArgs e) { EkraniTemizle(); aktifSeans = (VAR.Seans)cbbSeanslar.SelectedItem; if (aktifSeans.HastaNo > 0) { //servis çağrılıyor. try { hasta = ISK.Hasta.HastaGetir(aktifSeans.HastaNo); } catch (Exception ex) { Yardimci.HataKaydet(ex); MessageBox.Show("Serviste bir hata oluştu!"); } } BilgileriYukle(); }
private void FormAnaSayfa_Load(object sender, EventArgs e) { //Hata kaydet test ediliyor. Yardimci.HataKaydet(new Exception("Hata kaydet testi.")); //giriş sayfası çağırılıyor. this.Hide(); FormGiris frm = new FormGiris(); frm.ShowDialog(this); if (Yardimci.KullaniciNo > 0) { //saat yazdırılıyor. SaatYaz(); //servis çağırılıyor. try { calisan = ISK.Calisan.CalisanGetir(Yardimci.KullaniciNo); } catch (Exception ex) { Yardimci.HataKaydet(ex); MessageBox.Show("Serviste bir hata oluştu!"); } //kullanıcı bilgisi durum çubuğunda görüntüleniyor. tsiKullanici.Text = calisan.GoruntuMetni; MenuYukle(); //menü yükleniyor. } else { this.Close(); } //SaatYaz(); }
private void lnkRandevuIptalEt_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { string mesaj = "Randevuyu iptal etmek istediğinizden emin misiniz?"; DialogResult karar = MessageBox.Show(mesaj, "İptal Onayı", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (karar == DialogResult.Yes) { bool sonuc = false; //servis çağrılıyor. try { sonuc = ISK.Seans.RandevuIptalEt(sonRandevu.No); } catch (Exception ex) { Yardimci.HataKaydet(ex); MessageBox.Show("Serviste bir hata oluştu!"); } if (sonuc) { RandevuBilgisiYukle(); } } }