public string MailDogrula(string mail, string kod, string girilenKod)
 {
     if (kod == girilenKod)
     {
         Hasta hasta = hastaDal.Get(x => x.Mail == mail);
         hasta.IsMailVerified = true;
         hastaDal.Update(hasta);
         return(hasta.TC);
     }
     else
     {
         return(string.Empty);
     }
 }
Exemplo n.º 2
0
        public ActionResult SonAdim(Uye uye)
        {
            Hasta temphasta = Session["hasta"] as Hasta;
            Uye   tempuye   = uye;

            tempuye.Type = true;
            _uyeService.Insert(tempuye);
            temphasta.UyeID = uye.ID;
            _hastaService.Insert(ResimEkle.GetUploadPhoto(temphasta, _file));
            Session["uye"]       = null;
            Session["hasta"]     = null;
            Session["donor"]     = null;
            Session["donoronay"] = null;
            return(RedirectToAction("Index", "Hasta"));
        }
Exemplo n.º 3
0
        public int Add(Hasta hasta)
        {
            query = "INSERT INTO Hasta(Ad,Soyad,TCKN,UserID) VALUES(@ad,@soyad,@tckn,@userID)";
            SqlParameter        ad        = new SqlParameter("@ad", hasta.Ad);
            SqlParameter        soyad     = new SqlParameter("@soyad", hasta.Soyad);
            SqlParameter        tckn      = new SqlParameter("@tckn", hasta.TCKN);
            SqlParameter        userID    = new SqlParameter("@userID", hasta.UserID);
            List <SqlParameter> sqlParams = new List <SqlParameter> {
                ad, soyad, tckn, userID
            };

            helper.AddMultiParameters(sqlParams);

            return(helper.ExecuteNonQuery(query));
        }
Exemplo n.º 4
0
 private void lstKayıtlar_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (lstKayıtlar.SelectedIndex == -1)
     {
         return;
     }
     secilihasta               = lstKayıtlar.SelectedItem as Hasta;
     txtAd.Text                = secilihasta.Ad;
     txtSoyad.Text             = secilihasta.Soyad;
     txtTckn.Text              = secilihasta.Tckn;
     txtMail.Text              = secilihasta.Mail;
     mtbTel.Text               = secilihasta.Telefon;
     cmbCinsiyet.SelectedIndex = (int)secilihasta.Cinsiyet;
     dtpDogumTarihi.Value      = secilihasta.Dgmtarihi;
 }
Exemplo n.º 5
0
 private void Desde_TextChanged(object sender, EventArgs e)
 {
     if (Desde.Text.Length > 0)
     {
         SeleccionarHasta.Enabled = true;
         monthCalendar2.MinDate   = Convert.ToDateTime(Desde.Text.ToString()).AddDays(1);
         if (Hasta.Text.Length > 0)
         {
             if (Convert.ToDateTime(Desde.Text.ToString()).CompareTo(Convert.ToDateTime(Hasta.Text.ToString())) > 0)
             {
                 Hasta.ResetText();
             }
         }
     }
 }
Exemplo n.º 6
0
        private void btnRandevuSec_Click(object sender, EventArgs e)
        {
            Hasta hasta = lstHasta.SelectedItem as Hasta;

            bool sonuc = RandevuServis.HastaninSecilenSaateBaskaRandevusuVarMi(hasta, tiklananBtn);

            RandevuServis.SecilenSaateRandevuAlmaDurumu(sonuc, (Doktor)lstDoktor.SelectedItem, (Hasta)lstHasta.SelectedItem, tiklananBtn);
            RandevuServis.HastaninRandevulariniGetir((Hasta)lstHasta.SelectedItem, lstViewHastaRandevuları);
            lstDoktor.Items.Clear();
            lstHasta.SelectedIndex         = -1;
            flowLayoutPanelSaatler.Visible = false;
            btnRandevuSec.Visible          = false;
            cmbServis.SelectedIndex        = -1;
            gbRndIslemleri.Enabled         = false;
        }
Exemplo n.º 7
0
        private void lstRHastalar_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (lstRHastalar.SelectedItem == null)
            {
                return;
            }

            cmbPoliklinikler.Items.Clear();
            cmbDoktorlar.Items.Clear();
            cmbDoktorlar.Text     = string.Empty;
            cmbPoliklinikler.Text = string.Empty;
            flowLayoutPanel1.Controls.Clear();
            cmbPoliklinikler.Items.AddRange(Enum.GetNames(typeof(Poliklinikler)));
            seciliHasta = lstRHastalar.SelectedItem as Hasta;
        }
        private void button2_Click(object sender, EventArgs e)
        {
            DialogResult cevap = MessageBox.Show("Silmek istediğinizden emin misiniz?", "Uyarı", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

            if (cevap == DialogResult.Yes)
            {
                Hasta seciliHasta = (Hasta)(lstHastalar.FocusedItem.Tag);
                Hasta.Hastalar.Remove(seciliHasta);
                Islemler.HastalarListesiGuncelle(lstHastalar);
                Islemler.GroupBoxTemizle(groupBox3);
                this.Width        = 502;
                groupBox3.Visible = false;
                this.CenterToScreen();
            }
        }
Exemplo n.º 9
0
 private void lstHasta_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (lstHasta.SelectedIndex == -1)
     {
         seciliHasta       = null;
         gbRandevu.Visible = false;
         return;
     }
     seciliHasta               = lstHasta.SelectedItem as Hasta;
     txtAd.Text                = seciliHasta.Ad;
     txtSoyad.Text             = seciliHasta.Soyad;
     dtpDogumTarihi.Value      = seciliHasta.DogumTarihi;
     cmbCinsiyet.SelectedIndex = (int)seciliHasta.Cinsiyet;
     gbRandevu.Visible         = true;
 }
Exemplo n.º 10
0
        public ActionResult Create([Bind(Include = "Id,Tc,Ad,Soyad,Cinsiyet,DogumTarihi,DogumYeri,AnneAdi,BabaAdi,CepTel,Mail,Sifre,TSifre")] Hasta hasta)
        {
            if (Session["hastaId"] == null)
            {
                return(RedirectToAction("Index", "Login"));
            }
            if (ModelState.IsValid)
            {
                db.Hastas.Add(hasta);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(hasta));
        }
 private void Button_Click(object sender, RoutedEventArgs e)//delete
 {
     if (txtTc.Text.ToString() != "")
     {
         Hasta silinecekkisi = new Hasta();
         silinecekkisi.Hasta_TC = txtTc.Text.ToString();
         hp.Sil(silinecekkisi);
         HemsireGiris.hg.Listele();
         this.Close();
         MessageBox.Show("İşlem başarıyla gerçekleştirildi.");
     }
     else
     {
         MessageBox.Show("Silenecek hastanın bilgilerini giriniz.");
     }
 }
Exemplo n.º 12
0
        public ActionResult AnonsGec(Hasta hasta, string kanGrubu)
        {
            if (ModelState.IsValid)
            {
                hasta.Tarih    = DateTime.Now;
                hasta.KanGrubu = kanGrubu;
                _hastaService.Add(hasta);
            }
            var hastalar             = _hastaService.GetAll();
            HastaListViewModel model = new HastaListViewModel
            {
                Hastas = hastalar.OrderByDescending(x => x.Tarih).ToList()
            };

            return(RedirectToAction("KanIhtiyaci", model));
        }
        private void lstHastalar_SelectedIndexChanged(object sender, EventArgs e)
        {
            Hasta seciliHasta = (Hasta)(lstHastalar.FocusedItem.Tag);

            txtAd.Text               = seciliHasta.Ad;
            txtSoyad.Text            = seciliHasta.Soyad;
            txtTCKimlikNo.Text       = seciliHasta.TCKN;
            txtMail.Text             = seciliHasta.Mail;
            txtTelefon.Text          = seciliHasta.Telefon;
            txtAdres.Text            = seciliHasta.Adres;
            dTDogumTarihi.Value      = seciliHasta.DogumTarihi;
            cmbCinsiyet.SelectedItem = seciliHasta.Cinsiyet;
            this.Width               = 926;
            groupBox3.Visible        = true;
            this.CenterToScreen();
        }
Exemplo n.º 14
0
 public frmRandevu(Hasta _hasta)
 {
     InitializeComponent();
     _hastaneBLL     = new HastaneBLL();
     hdDTO           = new List <HastaneDepDTO>();
     _depBLL         = new DepartmanBLL();
     _dokBLL         = new DoktorBLL();
     _seansBLL       = new SeansBLL();
     _hastaBLL       = new HastaBLL();
     _randevuBLL     = new RandevuBLL();
     _gununTarihiBLL = new GununTarihiBLL();
     hasta           = new Hasta();
     hasta           = _hasta;
     hastaneler      = _hastaneBLL.GetHastaneler();
     departmanlar    = _depBLL.GetDepartmanlar();
 }
Exemplo n.º 15
0
 public static void HastaninSadeceRandevuBilgisiniGetir(Hasta hasta, ListView lst)
 {
     lst.Items.Clear();
     foreach (RandevuBilgileri item in HastaServis.HastaRandevulari)
     {
         if (item.HastaBilgisi == hasta)
         {
             ListViewItem li = new ListViewItem();
             li.Text = item.RandevuZamani.ToShortDateString();
             li.SubItems.Add(item.RandevuSaat);
             li.SubItems.Add(item.DoktorBilgisi.DoktorBrans.ToString());
             li.SubItems.Add("Dr." + item.DoktorBilgisi.personAd + " " + item.DoktorBilgisi.personSoyad);
             lst.Items.Add(li);
             li.Tag = item;
         }
     }
 }
Exemplo n.º 16
0
        private void lstHastaList_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (lstHastaList.SelectedItem == null)
            {
                return;
            }

            Hasta secilikisi = lstHastaList.SelectedItem as Hasta;

            txtHastaAd.Text          = secilikisi.Ad;
            txtHastaSoyad.Text       = secilikisi.Soyad;
            txtHastaEmail.Text       = secilikisi.Email;
            txtHastaTelefon.Text     = secilikisi.Telefon;
            txtHastaTCKN.Text        = secilikisi.TCKN;
            btnHastaKaydet.Enabled   = false;
            btnHastaGuncelle.Enabled = true;
        }
Exemplo n.º 17
0
        public static bool HastaninSecilenSaateBaskaRandevusuVarMi(Hasta hasta, Button btn)
        {
            bool durum = false;

            foreach (RandevuBilgileri item in HastaServis.HastaRandevulari)
            {
                if (item.HastaBilgisi == hasta)
                {
                    if (item.RandevuSaat == btn.Text)
                    {
                        durum = true;
                    }
                }
            }

            return(durum);
        }
        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);
            }
        }
Exemplo n.º 19
0
        public static void TaburcuEt(Hasta no)
        {
            string     sorgu = "update Sevk set Taburcu=1 where DosyaNo=@no";
            SqlCommand cmd   = new SqlCommand(sorgu);

            cmd.Parameters.AddWithValue("@no", no.DosyaNo);
            SQLDB.Execute(cmd);
            string sorgu2 = "insert into Cikis(DosyaNo,SevkTarihi,CikisTarihi,Odeme,ToplamTutar)values(" +
                            "@no,@sevktarihi,@cikistarihi,@odeme,@toplamtutar";
            SqlCommand cmd2 = new SqlCommand(sorgu2);

            cmd2.Parameters.AddWithValue("@no", no.DosyaNo);
            cmd2.Parameters.AddWithValue("@sevktarihi", DateTime.Now);
            cmd2.Parameters.AddWithValue("@cikistarihi", DateTime.Now);
            cmd2.Parameters.AddWithValue("@odeme", 0);
            cmd2.Parameters.AddWithValue("@toplamtutar", 0);
        }
Exemplo n.º 20
0
        private void lstKisiler_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (lstHastalar.SelectedItem == null)
            {
                return;
            }

            Hasta seciliKisi = (Hasta)lstHastalar.SelectedItem;

            txtAd.Text           = seciliKisi.Ad;
            txtSoyad.Text        = seciliKisi.Soyad;
            mtxtTelefon.Text     = seciliKisi.Telefon;
            txtEmail.Text        = seciliKisi.Email;
            txtTckn.Text         = seciliKisi.TCKN;
            cmbCinsiyet.Text     = seciliKisi.Cinsiyet;
            dtpDogumTarihi.Value = seciliKisi.DogumTarihi;
        }
        private void BtnLogin_Click(object sender, System.EventArgs e)
        {
            KlavyeGizle();

            bool isLoggedIn = loginService.GirisYap(txtTC.Text, txtPass.Text, rbYonetici.Checked);

            if (isLoggedIn)
            {
                if (txtTC.Text == "1")
                {
                    //admin activity çağır
                    var intent = new Intent(this, typeof(AdminAnaSayfaActivity));
                    StartActivity(intent);
                }
                else if (rbYonetici.Checked)
                {
                    //doktor activity çağır
                    var intent = new Intent(this, typeof(DoktorProfilimActivity));
                    intent.PutExtra("tc", txtTC.Text);
                    StartActivity(intent);
                }
                else
                {
                    Hasta hasta = hastaService.Getir(txtTC.Text);

                    if (hasta.IsMailVerified)
                    {
                        //randevu alma activity çağır
                        var intent = new Intent(this, typeof(HastaProfilimActivity));
                        intent.PutExtra("tc", txtTC.Text);
                        StartActivity(intent);
                    }
                    else
                    {
                        //mail dogrulama activity çağır
                        var intent = new Intent(this, typeof(MailOnayActivity));
                        intent.PutExtra("mail", hasta.Mail);
                        StartActivity(intent);
                    }
                }
            }
            else
            {
                Toast.MakeText(Application.Context, "Giriş yapılamadı. Lütfen bilgilerinizi kontrol edin.", ToastLength.Long).Show();
            }
        }
Exemplo n.º 22
0
        public static void YeniHastaKaydet(string tc, string ad, string soyad, DateTime dogumtrh, Cinsiyet cinsiyeti, string mail, string tel)
        {
            Hasta yeniHasta = new Hasta()
            {
                KisiTipi          = PersonKisiTipi.Hasta,
                personTCNo        = tc,
                personAd          = ad,
                personSoyad       = soyad,
                personDogumTarihi = dogumtrh,
                personCinsiyet    = cinsiyeti,
                personMail        = mail,
                personTel         = tel
            };

            HastaServis.HastaListesi.Add(yeniHasta);
            MessageBox.Show("Yeni hasta eklendi");
        }
Exemplo n.º 23
0
        private void btnUyeOl_Click(object sender, EventArgs e)
        {
            Hasta hasta = new Hasta();

            hasta.Ad    = txtUyeAdi.Text;
            hasta.Soyad = txtUyeSoyadi.Text;
            //hasta.TCKN = txtUyeTCKN.Text;
            //hasta.Telefon = txtUyeTelefon.Text;

            //MaskedTextBox kullandığımız için daha önce kullandığımız TextBox'ları pasifleştirdik.

            hasta.TCKN         = mskTxtTCKN.Text;
            hasta.Telefon      = mskTxtTelefon.Text;
            hasta.KullaniciAdi = txtUyeMail.Text;
            hasta.Sifre        = txtUyeSifre.Text;

            bool kaydedildiMi = hastaBLL.HastaKaydet(hasta);

            if (kaydedildiMi)
            {
                MessageBox.Show("Hasta başarıyla kaydedildi");
                foreach (Control item in groupBox2.Controls)
                {
                    if (item is TextBox)
                    {
                        TextBox tb = item as TextBox;

                        tb.Clear();
                    }

                    if (item is MaskedTextBox)
                    {
                        MaskedTextBox mtb = item as MaskedTextBox;
                        mtb.Clear();
                    }
                }
            }
            else
            {
                MessageBox.Show("HATA : Hasta eklenemedi");
            }

            //Burada hasta sisteme kaydolacak. Insert into Hastalar...
            //Insert ederken de şifrenin en az 8 en fazla 16 karakter olması ve özel karakter içermemesi gerekiyor.
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.hastaProfilim_layout);

            // Create your application here

            hastaAd = FindViewById <TextView>(Resource.Id.lblHastaAdi);

            hastaSoyad = FindViewById <TextView>(Resource.Id.lblHastaSoyadi);

            hastaTCKN = FindViewById <TextView>(Resource.Id.lblHastaTCKN);

            hastaCinsiyet = FindViewById <TextView>(Resource.Id.lblHastaCinsiyet);

            hastaDogumTarihi = FindViewById <TextView>(Resource.Id.lblHastaDogumTarihi);

            hastaProfiliGuncelle = FindViewById <Button>(Resource.Id.btnHastaBilgiDuzenle);
            hastaProfilImg       = FindViewById <ImageView>(Resource.Id.hastaProfilImg);

            hasta = hastaService.Getir(Intent.GetStringExtra("tc"));

            hastaTCKN.Text = "TC No : " + hasta.TC;

            hastaAd.Text = "Hasta Adý : " + hasta.Ad;

            hastaSoyad.Text = "Hasta Soyadý : " + hasta.Soyad;

            if (hasta.Cinsiyet == 0)
            {
                hastaCinsiyet.Text = "Cinsiyet : Kadýn";
                hastaProfilImg.SetImageResource(Resource.Drawable.woman);
            }

            else
            {
                hastaCinsiyet.Text = "Cinsiyet : Erkek";
                hastaProfilImg.SetImageResource(Resource.Drawable.man);
            }


            hastaDogumTarihi.Text = "Doðum Tarihiniz : " + hasta.DogumTarihi.Value.ToShortDateString().ToString();

            hastaProfiliGuncelle.Click += HastaProfiliGuncelle_Click;
        }
Exemplo n.º 25
0
        private void btnSil_Click(object sender, EventArgs e)
        {
            if (seciliHasta == null)
            {
                MessageBox.Show("Silmek için hasta seçmediniz!");
                return;
            }
            seciliHasta = (Hasta)lstListe.SelectedItem;
            DialogResult cevap = MessageBox.Show($"{ seciliHasta.Ad} adlı hastayı silmek istiyor musunuz?", "Öğrenci Silme", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

            if (cevap == DialogResult.Yes)
            {
                Hastalar.Remove(seciliHasta);
                ListeyiDoldur();
                seciliHasta = null;
                MessageBox.Show("Öğrenci başarıyla silindi");
            }
        }
Exemplo n.º 26
0
 private void lstSeans_DoubleClick(object sender, EventArgs e)
 {
     if (lstSeans.SelectedItems.Count > 0)
     {
         _seans = _seansBLL.SeansinDetaylariniGetir((int)lstSeans.SelectedItems[0].Tag);
         Randevu    randevu    = _randevuBLL.GetBySeanceID(_seans.SeansID);
         Hasta      hastamiz   = _hastaBLL.GetHastaByID(randevu.HastaID);
         frmMuayene frmMuayene = new frmMuayene(hastamiz, randevu);
         frmMuayene.Owner = this;
         frmMuayene.ShowDialog();
         dtpCalismaGunu_ValueChanged(null, null);
     }
     else
     {
         MessageBox.Show("Listenizde seçili randevu bulunmamaktadır !", "Uyarı", MessageBoxButtons.OK, MessageBoxIcon.Warning);
         return;
     }
 }
        public IActionResult Post([FromBody] Hasta model)
        {
            ServiceResponse <Hasta> response = new ServiceResponse <Hasta>();

            if (service.GetByTc(model.TC))
            {
                response.Errors.Add("böyle bir tcli Hasta var");
                response.HasError = true;
                return(BadRequest(response));
            }
            else
            {
                service.Create(model);
                response.entity       = model;
                response.IsSuccessful = true;
                return(Ok(response));
            }
        }
        public IActionResult Post([FromBody] LoginViewModel model)
        {
            ServiceResponse <Hasta> response = new ServiceResponse <Hasta>();
            Hasta entity = service.GetByHasta(model.Tc, model.Parola);

            if (entity == null)
            {
                response.Errors.Add("Hasta bulunamadı");
                response.HasError = true;
                return(BadRequest(response));
            }
            else
            {
                response.entity       = entity;
                response.IsSuccessful = true;
                return(Ok(response));
            }
        }
Exemplo n.º 29
0
 private void HastaGirisFormuAc(string _sifre, string _kullaniciAdi)
 {
     varMi = _logBLL.KullaniciVarMi(_kullaniciAdi, _sifre, tip);
     if (varMi)
     {
         lnkRandevu.Visible = true;
         groupBox1.Visible  = false;
         hasta = _logBLL.HastayiGetir(_kullaniciAdi, tip);
         lblGirisYapan.Text = hasta.HastaAdSoyad;
         lblGirisYapan.Tag  = hasta.HastaID;
         lnkYeniUye.Visible = false;
     }
     else
     {
         lnkYeniUye.Visible = true;
         MessageBox.Show("Sistemde kayıtlı değilsiniz.Lütfen üye olunuz !", "Uyarı", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
 }
Exemplo n.º 30
0
        // GET: HastaBilgi/Delete/5
        public ActionResult Delete(int?id)
        {
            if (Session["hastaId"] == null)
            {
                return(RedirectToAction("Index", "Login"));
            }
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Hasta hasta = db.Hastas.Find(id);

            if (hasta == null)
            {
                return(HttpNotFound());
            }
            return(View(hasta));
        }