private void TxtPolikinlik_SelectedIndexChanged(object sender, EventArgs e) { try { int siraNo = Convert.ToInt32(Veritabani.SiraNoVer(txtPolikinlik.Text, txtSevkTarihi.Text)); siraNo++; txtSiraNo.Text = siraNo.ToString(); } catch (Exception a) { MessageBox.Show("Bir hata oluştu:" + a.Message, "UYARI", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
public ActionResult Detay(int id) { Veritabani db = new Veritabani(); if (db.kisiler.Any(x => x.id == id) == true) { Kisi k = db.kisiler.FirstOrDefault(x => x.id == id); ViewBag.kisi = k; } else { return(RedirectToAction("Index")); } return(View()); }
private void buttonekle_Click(object sender, EventArgs e) { d1 = new DERS(); d1.DERS_AD = textBoxders.Text; d1.ACIKLAMA = richTextBoxacıklama.Text; Veritabani.Connect(); bool deger = Veritabani.DERS_EKLE(d1); if (deger) { MessageBox.Show("Ders Eklendi"); } Veritabani.Disconnect(); }
private void buttonsil_Click(object sender, EventArgs e) { Veritabani.Connect(); ogr.OGRENCI_NO = textBox_Numara.Text; bool deger = Veritabani.OGRENCI_SIL(ogr); Veritabani.Disconnect(); if (deger == true) { MessageBox.Show("Giriş Başarılı"); } else { MessageBox.Show("Giriş Başarısız"); } }
private void KullaniciTanitmaLogin_Load(object sender, EventArgs e) { try { this.txtKullanici.KeyPress += new System.Windows.Forms.KeyPressEventHandler(CheckEnter); Veritabani.ElemanEkle("userName", "tblKullanici", "", ""); for (int i = 0; i < Veritabani.kullaniciIsimleri.Count; i++) { txtKullanici.Items.Add(Veritabani.kullaniciIsimleri[i]); } } catch (Exception a) { MessageBox.Show("Bir hata oluştu:" + a.Message, "UYARI", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
private void buttongiris_Click(object sender, EventArgs e) { Veritabani.Connect(); k1.USERNAME = textBoxad.Text; k1.SIFRE = textBoxsifre.Text; lk1 = Veritabani.KULLANICI_GETIR(k1); if (lk1.Count > 0 && textBoxad.Text != "" && textBoxad.Text != "") { ana.Show(); this.Hide(); } Veritabani.Disconnect(); }
private void BtnGit_Click(object sender, EventArgs e) { try { BtnTaburcu.Enabled = true; btnSecSil.Enabled = true; int z = 0; lblFiyat.Text = ""; Hasta hastaBilgisi = Veritabani.TaburcuKontrol(txtOncekiIslem.Text, txtDosyaNo.Text); dataGridView1.DataSource = Veritabani.IslemAra("tblSevk", txtOncekiIslem.Text, txtDosyaNo.Text).Tables[0]; if (dataGridView1.Rows.Count > 0) { for (int i = 0; i < dataGridView1.Rows.Count - 1; i++) { DataGridViewCellStyle renk = new DataGridViewCellStyle(); if (Convert.ToBoolean(dataGridView1.Rows[i].Cells["taburcu"].Value) == true) { renk.BackColor = Color.White; renk.ForeColor = Color.Black; } else { z++; renk.BackColor = Color.Red; renk.ForeColor = Color.Black; } dataGridView1.Rows[i].DefaultCellStyle = renk; } } if (z == 0) { MessageBox.Show("Hasta bu sevkten taburcu edilmiş.", "UYARI", MessageBoxButtons.OK, MessageBoxIcon.Information); BtnTaburcu.Enabled = false; } else { BtnTaburcu.Enabled = true; lblFiyat.Text = Veritabani.FiyatHesapla(txtDosyaNo.Text, txtOncekiIslem.Text).ToString(); } } catch (Exception a) { MessageBox.Show("Bir hata oluştu:" + a.Message, "UYARI", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
public string Recognise(Image <Gray, byte> Input_image, int Eigen_Thresh = -1) { if (_IsTrained) { EigenObjectRecognizer.RecognitionResult ER = recognizer.Recognize(Input_image); //handle if recognizer.EigenDistanceThreshold is set as a null will be returned //NOTE: This is still not working correctley if (ER == null) { Eigen_label = "Tanımsız"; Eigen_Distance = 0; return(Eigen_label); } else { try { OGRENCI ogr = new OGRENCI(); ogr.OGRENCI_NO = ER.Label; Eigen_label = Veritabani.OGRENCI_GETIR(ogr)[0].AD + Veritabani.OGRENCI_GETIR(ogr)[0].SOYAD; Eigen_Distance = ER.Distance; if (Eigen_Thresh > -1) { Eigen_threshold = Eigen_Thresh; } if (Eigen_Distance > Eigen_threshold) { return(Eigen_label); } else { return("Tanımsız"); } } catch (Exception) { return("Tanımsız"); } } } else { return(""); } }
private void BtnSil_Click(object sender, EventArgs e) { try { DialogResult durum = MessageBox.Show("Kaydı silmek istediğinizden emin misiniz?", "UYARI", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (DialogResult.Yes == durum) { Veritabani.VeriSil("tblHasta", "dosyaNo", txtDosyaNo.Text, "", ""); MessageBox.Show("Veri silindi.", "UYARI", MessageBoxButtons.OK, MessageBoxIcon.Information); Temizle(); } this.Close(); } catch (Exception a) { MessageBox.Show("Bir hata oluştu:" + a.Message, "UYARI", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
private void BtnEkle_Click(object sender, EventArgs e) { try { BtnTaburcu.Enabled = false; btnSecSil.Enabled = false; if (txtPolikinlik.Text == "" || txtDrKodu.Text == "" || txtYapilanIslem.Text == "" || txtDosyaNo.Text == "" || txtSiraNo.Text == "") { MessageBox.Show("Lütfen boş alan bırakmayınız.", "UYARI", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { lblFiyat.Text = ""; Sevk yeniSevk = new Sevk() { SevkTarihi = txtSevkTarihi.Text, DosyaNo = txtDosyaNo.Text, Polikinlik = txtPolikinlik.Text, Saat = DateTime.Now.Hour + ":" + DateTime.Now.Minute, YapilanIslem = txtYapilanIslem.Text, DrKod = txtDrKodu.Text, Miktar = txtMiktar.Value.ToString(), BirimFiyat = txtBirimFiyat.Text, Sira = txtSiraNo.Text, Taburcu = "false" }; Veritabani.SevkEkle(yeniSevk); veriTablo.Rows.Add(yeniSevk.Polikinlik, yeniSevk.Sira, yeniSevk.DrKod, yeniSevk.Saat, yeniSevk.YapilanIslem, yeniSevk.Miktar, yeniSevk.BirimFiyat, yeniSevk.DosyaNo, yeniSevk.SevkTarihi); dataGridView1.DataSource = veriTablo; int birimFiyat = Convert.ToInt32(yeniSevk.BirimFiyat); int miktar = Convert.ToInt32(yeniSevk.Miktar); toplam += birimFiyat * miktar; lblFiyat.Text = toplam.ToString(); Temizle(); txtSiraNo.Text = ""; } } catch (Exception a) { MessageBox.Show("Bir hata oluştu:" + a.Message, "UYARI", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
private void BtnSil_Click(object sender, EventArgs e) { try { DialogResult durum = MessageBox.Show("Kaydı silmek istediğinizden emin misiniz?", "UYARI", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (DialogResult.Yes == durum) { Veritabani.VeriSil("tblPolikinlik", "polikinlikAdi", txtPolikinlikAdi.Text, "", ""); MessageBox.Show("Veri silindi.", "UYARI", MessageBoxButtons.OK, MessageBoxIcon.Information); txtAciklama.Clear(); txtPolikinlikAdi.Clear(); chkDurum.Checked = false; } } catch (Exception a) { MessageBox.Show("Bir hata oluştu:" + a.Message, "UYARI", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
private void BtnGuncelle_Click(object sender, EventArgs e) { try { if (Kontrol()) { Kullanici yeniKullanici = kullaniciDoldur(); Veritabani.KullaniciKaydetGuncelle(yeniKullanici, "Guncelle", txtKullaniciAdi.Text); MessageBox.Show("Güncelleme işlemi başarıyla gerçekleşti.", "UYARI", MessageBoxButtons.OK, MessageBoxIcon.Information); this.Close(); } else { MessageBox.Show("Lütfen boş alan bırakmayınız.", "UYARI", MessageBoxButtons.OK, MessageBoxIcon.Error); } } catch (Exception a) { MessageBox.Show("Bir hata oluştu:" + a.Message, "UYARI", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
private void buttonsil_Click(object sender, EventArgs e) { k1.USERNAME = textBoxad.Text; k1.SIFRE = textBoxsifre.Text; Veritabani.Connect(); if (textBoxad.Text != "" && textBoxsifre.Text != "") { deger = Veritabani.KULLANICI_SIL(k1); } else { MessageBox.Show("lütfen boş alanları doldurunuz"); } if (deger == true) { MessageBox.Show("Kullanıcı silindi"); } Veritabani.Disconnect(); }
private void BtnYeni_Click(object sender, EventArgs e) { try { if (Kontrol()) { Veritabani.HastaGuncelle(BilgiDoldur(), "Ekle", ""); MessageBox.Show("Kaydetme işlemi başarıyla gerçekleşti.", "UYARI", MessageBoxButtons.OK, MessageBoxIcon.Information); Temizle(); } else { MessageBox.Show("Lütfen boş alan bırakmayınız.", "UYARI", MessageBoxButtons.OK, MessageBoxIcon.Error); } this.Close(); } catch (Exception a) { MessageBox.Show("Bir hata oluştu:" + a.Message, "UYARI", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
private void buttonekle_Click(object sender, EventArgs e) { kul = new KULLANICI(); kul.USERNAME = textBoxkullanıcıad.Text; kul.SIFRE = textBoxsifre.Text; kul.TCK_NO = textBoxtc.Text; kul.AD = textBoxad.Text; kul.SOYAD = textBoxsoyad.Text; Veritabani.Connect(); bool deger = Veritabani.KULLANICI_EKLE(kul); Veritabani.Disconnect(); if (deger == true) { MessageBox.Show("Kayıt Başarılı "); } else { MessageBox.Show("Kayıt Başarısız "); } }
private void Button2_Click(object sender, EventArgs e) { try { Veritabani.TaburcuEt(sevkID); Cikis yeniCikis = new Cikis() { CikisSaati = DateTime.Now.Hour + ":" + DateTime.Now.Minute, DosyaNo = txtDosyaNo.Text, SevkTarihi = txtSevkTarihi.Text, Odeme = txtOdeme.Text, ToplamTutar = txtTutar.Text }; Veritabani.cikisKaydet(yeniCikis); MessageBox.Show("Hasta taburcu edildi.", "UYARI", MessageBoxButtons.OK, MessageBoxIcon.Information); this.Close(); } catch (Exception a) { MessageBox.Show("Bir hata oluştu:" + a.Message, "UYARI", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
private void BtnSecSil_Click(object sender, EventArgs e) { try { if (dataGridView1.Rows.Count > 1) { string dosyaNo = dataGridView1.CurrentRow.Cells["dosyaNo"].Value.ToString(); string sevkID = dataGridView1.CurrentRow.Cells["sevkID"].Value.ToString(); DialogResult durum = MessageBox.Show("Kaydı silmek istediğinizden emin misiniz?", "UYARI", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (DialogResult.Yes == durum) { Veritabani.VeriSil("tblSevk", "dosyaNo", dosyaNo, "sevkID", sevkID); MessageBox.Show("Veri silindi.", "UYARI", MessageBoxButtons.OK, MessageBoxIcon.Information); } } dataGridView1.DataSource = Veritabani.IslemAra("tblSevk", txtOncekiIslem.Text, txtDosyaNo.Text).Tables[0]; } catch (Exception a) { MessageBox.Show("Bir hata oluştu:" + a.Message, "UYARI", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
private void btnOgrenciEkle_Click(object sender, EventArgs e) { ogr.TCK_NO = txtkimlik.Text; ogr.AD = txtAd.Text; ogr.SOYAD = txtSoyad.Text; //ogr.OGRENCI_NO= txtOgrenciNumara.Text; ogr.DOGUM_TARIHI = dtDogumTarihi.Value; ogr.CINSIYET = cmbCinsiyet.Text == "ERKEK" ? "E" : "K"; ogr.SINIF = cmbSınıf.Text.Split('.')[0]; Veritabani.Connect(); bool deger = Veritabani.OGRENCI_EKLE(ogr); Veritabani.Disconnect(); if (deger == true) { MessageBox.Show("Kayıt Başarılı "); } else { MessageBox.Show("Kayıt Başarısız "); } }
private void HastaIslemleri_Load(object sender, EventArgs e) { try { veriTablo.Columns.Add("polikinlik", typeof(string)); veriTablo.Columns.Add("sira", typeof(string)); veriTablo.Columns.Add("drKod", typeof(string)); veriTablo.Columns.Add("saat", typeof(string)); veriTablo.Columns.Add("yapilanIslem", typeof(string)); veriTablo.Columns.Add("miktar", typeof(string)); veriTablo.Columns.Add("birimFiyat", typeof(string)); veriTablo.Columns.Add("dosyaNo", typeof(string)); veriTablo.Columns.Add("sevkTarihi", typeof(string)); this.txtDosyaNo.KeyPress += new System.Windows.Forms.KeyPressEventHandler(CheckEnter); Veritabani.ElemanEkle("polikinlikAdi", "tblPolikinlik", "True", "durum"); for (int i = 0; i < Veritabani.kullaniciIsimleri.Count; i++) { txtPolikinlik.Items.Add(Veritabani.kullaniciIsimleri[i]); } Veritabani.ElemanEkle("islemAdi", "tblIslem", "", ""); for (int i = 0; i < Veritabani.kullaniciIsimleri.Count; i++) { txtYapilanIslem.Items.Add(Veritabani.kullaniciIsimleri[i]); } Veritabani.ElemanEkle("kodu", "tblKullanici", "Doktor", "unvan"); for (int i = 0; i < Veritabani.kullaniciIsimleri.Count; i++) { txtDrKodu.Items.Add(Veritabani.kullaniciIsimleri[i]); } txtPolikinlik.Text = txtPolikinlik.Items[0].ToString(); } catch (Exception a) { MessageBox.Show("Bir hata oluştu:" + a.Message, "UYARI", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
private void HastaBilgileri_Load(object sender, EventArgs e) { Hasta hastaBilgisi; if (dosyaNoVarmi == true) { btnYeni.Enabled = false; txtTcKimlik.Enabled = false; hastaBilgisi = Veritabani.HastaIslemleriGetir(dosyaNo); txtDosyaNo.Text = dosyaNo; txtTcKimlik.Text = hastaBilgisi.TcNo; txtAdi.Text = hastaBilgisi.Adi; txtSoyad.Text = hastaBilgisi.Soyadi; txtDogumYeri.Text = hastaBilgisi.DogumYeri; txtDogumTarihi.Value = hastaBilgisi.DogumTarihi; txtBabaAdi.Text = hastaBilgisi.BabaAdi; txtAnneAdi.Text = hastaBilgisi.AnneAdi; txtCinsiyet.Text = hastaBilgisi.Cinsiyet.ToString(); txtMedeniHali.Text = hastaBilgisi.MedeniDurum.ToString(); txtKanGrubu.Text = hastaBilgisi.KanGrubu; txtAdres.Text = hastaBilgisi.Adres; txtTel.Text = hastaBilgisi.TelefonNo; txtYakınNo.Text = hastaBilgisi.YakinNo; txtKurumSicilNo.Text = hastaBilgisi.KurumSicilNo; txtKurumAdi.Text = hastaBilgisi.KurumAdi; txtYakınKurumSicilNo.Text = hastaBilgisi.YakinKurumSicilNo; txtYakinKurumAdi.Text = hastaBilgisi.YakinKurumAdi; } else { int yeniDosyaNo = Convert.ToInt32(Veritabani.maxVeri("dosyaNo", "tblHasta")); yeniDosyaNo++; txtDosyaNo.Text = yeniDosyaNo.ToString(); btnGuncelle.Enabled = false; btnSil.Enabled = false; } }
private void Doldur() { try { string deger = Veritabani.VeriAra("tblHasta", "dosyaNo", txtDosyaNo.Text, "dosyaNo"); if (deger != "") { hastaBilgisi = Veritabani.HastaIslemleriGetir(txtDosyaNo.Text); txtHastaAdi.Text = hastaBilgisi.Adi; txtHastaSoyadi.Text = hastaBilgisi.Soyadi; txtKurumAdi.Text = hastaBilgisi.KurumAdi; for (int i = 0; i < hastaBilgisi.sevkTarihleri.Count; i++) { if (!txtOncekiIslem.Items.Contains(hastaBilgisi.sevkTarihleri[i])) { txtOncekiIslem.Items.Add(hastaBilgisi.sevkTarihleri[i]); } } } else if (deger == "" && txtDosyaNo.Text != "") { MessageBox.Show("Bu dosya numarasına sahip hasta bulunamadı.", "UYARI", MessageBoxButtons.OK, MessageBoxIcon.Error); } else { DosyaBul childForm = DosyaBul.DosyaBulInstance(); childForm.BringToFront(); childForm.MdiParent = Program.Owner; childForm.StartPosition = FormStartPosition.CenterScreen; childForm.Show(); } } catch (Exception a) { MessageBox.Show("Bir hata oluştu:" + a.Message, "UYARI", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
private void PdDocument_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e) { int iTopMargin = 0; StringFormat sformat = new StringFormat(); sformat.Alignment = StringAlignment.Near; e.Graphics.DrawString((DateTime.Now.ToShortDateString()), govde, sb, 700, 50); e.Graphics.DrawString("Selçuk Üniversitesi Tıp Fakültesi Hastanesi", baslik, sb, 250, 220); Image aImg = Image.FromFile(@"logo.png"); e.Graphics.DrawImage(aImg, 20, 40, 220, 170); try { int iLeftMargin = 100; iTopMargin = 0; bool bMorePagesToPrint = false; int iTmpWidth = 0; bFirstPage = true; if (bFirstPage) { foreach (DataGridViewColumn GridCol in dataGridView1.Columns) { iTmpWidth = (int)(Math.Floor((double)((double)GridCol.Width / (double)iTotalWidth * (double)iTotalWidth * ((double)e.MarginBounds.Width / (double)iTotalWidth)))); iHeaderHeight = (int)(e.Graphics.MeasureString(GridCol.HeaderText, GridCol.InheritedStyle.Font, iTmpWidth).Height) + 11; arrColumnLefts.Add(iLeftMargin); arrColumnWidths.Add(iTmpWidth); iLeftMargin += iTmpWidth; } } while (iRow <= dataGridView1.Rows.Count - 1) { DataGridViewRow GridRow = dataGridView1.Rows[iRow]; iCellHeight = GridRow.Height + 5; int iCount = 0; if (iTopMargin + iCellHeight >= e.MarginBounds.Height + e.MarginBounds.Top) { bNewPage = true; bFirstPage = false; bMorePagesToPrint = true; break; } else { if (bNewPage) { iTopMargin = 250; foreach (DataGridViewColumn GridCol in dataGridView1.Columns) { e.Graphics.FillRectangle(new SolidBrush(Color.LightGray), new Rectangle((int)arrColumnLefts[iCount], iTopMargin, (int)arrColumnWidths[iCount], iHeaderHeight)); e.Graphics.DrawRectangle(Pens.Black, new Rectangle((int)arrColumnLefts[iCount], iTopMargin, (int)arrColumnWidths[iCount], iHeaderHeight)); e.Graphics.DrawString(GridCol.HeaderText, GridCol.InheritedStyle.Font, new SolidBrush(GridCol.InheritedStyle.ForeColor), new RectangleF((int)arrColumnLefts[iCount], iTopMargin, (int)arrColumnWidths[iCount], iHeaderHeight), strFormat); iCount++; } bNewPage = false; iTopMargin += iHeaderHeight; } iCount = 0; foreach (DataGridViewCell Cel in GridRow.Cells) { if (Cel.Value != null) { e.Graphics.DrawString(Cel.Value.ToString(), Cel.InheritedStyle.Font, new SolidBrush(Cel.InheritedStyle.ForeColor), new RectangleF((int)arrColumnLefts[iCount], (float)iTopMargin, (int)arrColumnWidths[iCount], (float)iCellHeight), strFormat); } e.Graphics.DrawRectangle(Pens.Black, new Rectangle((int)arrColumnLefts[iCount], iTopMargin, (int)arrColumnWidths[iCount], iCellHeight)); iCount++; } } iRow++; iTopMargin += iCellHeight; } if (bMorePagesToPrint) { e.HasMorePages = true; } else { e.HasMorePages = false; } } catch (Exception exc) { MessageBox.Show(exc.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } e.Graphics.DrawString("Toplam tutar:" + Veritabani.FiyatHesapla(txtDosyaNo.Text, txtOncekiIslem.Text).ToString(), baslik, sb, 600, iTopMargin + 10); e.Graphics.DrawString(Veritabani.doktorIsmi(drKodu), baslik, sb, 550, iTopMargin + 60); e.Graphics.DrawString("İmza", baslik, sb, 550, iTopMargin + 80); e.Graphics.DrawString(DateTime.Now.ToShortDateString(), baslik, sb, 550, iTopMargin + 100); }
public ActionResult Kaydet() { ViewBag.Il = Veritabani.IlGetir(); ViewBag.Ilce = Veritabani.IlceGetir(); return(View(new Models.Musteri())); }
public ActionResult UrunEkle(Urun entity) { Veritabani.ElemanEkle(entity); return(View("UrunListe", Veritabani.Liste)); }
public ActionResult UrunEkle(Urun u) { Veritabani.UrunEkle(u); return(View("Index", Veritabani.List)); }
/// <summary> /// Recognise a Grayscale Image using the trained Eigen Recogniser /// </summary> /// <param name="Input_image"></param> /// <returns></returns> public string Recognise(Image <Gray, byte> Input_image, int Eigen_Thresh, FormYoklama form) { if (_IsTrained) { EigenObjectRecognizer.RecognitionResult ER = recognizer.Recognize(Input_image); //handle if recognizer.EigenDistanceThreshold is set as a null will be returned //NOTE: This is still not working correctley if (ER == null) { Eigen_label = "Tanımsız"; Eigen_Distance = 0; return(Eigen_label); } else { try { bool karar = true; OGRENCI ogr = new OGRENCI(); ogr.OGRENCI_NO = ER.Label; ogr = Veritabani.OGRENCI_GETIR(ogr)[0]; Eigen_label = ogr.AD + " " + ogr.SOYAD; foreach (DataGridViewRow row in form.dgYoklama.Rows) { if (row.Cells[0].Value.ToString().Contains(ogr.OGRENCI_NO)) { karar = false; } } if (karar) { OGRENCI ogr2 = new OGRENCI(); ogr2 = Veritabani.OGRENCI_GETIR(ogr)[0]; form.dgYoklama.Rows.Add(ogr2.OGRENCI_NO, ogr2.AD, ogr2.SOYAD, ogr2.CINSIYET); } Eigen_Distance = ER.Distance; if (Eigen_Thresh > -1) { Eigen_threshold = Eigen_Thresh; } if (Eigen_Distance > Eigen_threshold) { return(Eigen_label); } else { return("Tanımsız"); } } catch (Exception) { return("Tanımsız"); } } } else { return(""); } }