NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

using System;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace uygulama
{
class Program
{
public static void intro()
{
/****************************************************************************
** SDÜ
** TEKNOLOJİ FAKÜLTESİ
** MEKATRONİK MÜHENDİSLİĞİ BÖLÜMÜ
** PROGRAMLAMAYA GİRİŞİ DERSİ
**
** ÖDEV NUMARASI…...:
** ÖĞRENCİ ADI...............:
** ÖĞRENCİ NUMARASI.:
** ÖĞRENCİ ŞUBESİ
****************************************************************************/


}
static void Main(string[] args)
{
// hasta.txt dosyasında yer alancak alanlar
int secim;
string ha;
string hs;
string htc;
string hgsm;
int hy;
char hc;
string hb = "";
string atc;
char cevap = 'e';
string vas;
int vtc, vgsm;


do
{
Console.WriteLine("ttNe yapmak istiyorsunuz?");
Console.WriteLine("tt1)Hasta Kayıt Ekleme");
Console.WriteLine("tt2)Hasta Kayıtlarını Listeleme");
Console.WriteLine("tt3)Hasta Arama");
Console.WriteLine("tt4)Programdan Çıkış");
secim = Convert.ToInt32(Console.ReadLine());

} while (secim != 1 && secim != 2 && secim != 3);

if (secim == 1)
{
StreamWriter yazici = File.AppendText("hasta.txt");
do
{
Console.Write("Hastanın TC Kimlik Numarasını giriniz:");
htc = Console.ReadLine();
Console.Write("Hastanın Adını giriniz:");
ha = Console.ReadLine();
Console.Write("Hastanın Soyadını giriniz:");
hs = Console.ReadLine();
Console.Write("Hastanın Cinsiyetini giriniz:");
hc = Convert.ToChar(Console.ReadLine());
Console.Write("Hastanın Telefon Numarasını giriniz:");
hgsm = Console.ReadLine();
Console.Write("Hastanın Yaşını giriniz:");
hy = Convert.ToInt32(Console.ReadLine());
if (hy < 18)
{
Console.WriteLine("Hasta Reşit Olmadığı için Veli Bilgilerini Belirtiniz:");
Console.WriteLine("Hasta Velisinin TC Kimlik Numarasını Giriniz:");
vtc = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Hasta Velisinin Adı Soyadını Giriniz:");
vas = Console.ReadLine();
Console.WriteLine("Hasta Velisinin Telefon Numarasını Giriniz:");
vgsm = Convert.ToInt32(Console.ReadLine());
hb = htc + " | " + ha + " | " + hs + " | " + hy + " | " + hgsm + " | " + hc + vtc + " | " + vas + " | " + vgsm;
yazici.WriteLine(hb);
}
else
{


hb = htc + " | " + ha + " | " + hs + " | " + hy + " | " + hgsm + " | " + hc;
yazici.WriteLine(hb);
}

//using System.IO eklemeyi unutma;
Console.Write("Baska kayit yapacak misin?(e/h) ");
cevap = Convert.ToChar(Console.ReadLine());
if (cevap == 'e')
{
Console.WriteLine("************");
Console.WriteLine("************");
Console.WriteLine("************");
}
} while (!(cevap == 'h'));

yazici.Close();
Console.WriteLine("Kayıt Başarıyla eklendi.");
Console.ReadLine();
}
else if (secim == 2)
{
Console.WriteLine("************");
Console.WriteLine("TC KİMLİKtADItSOYADItYAŞtTELEFONtCİNSİYET");
string[] satirlar = File.ReadAllLines("Hasta.txt");
for (int i = 0; i < satirlar.Length; i++)
{
string[] satirdakiHastaBilgileri = satirlar[i].Split(';');
Console.Write(satirdakiHastaBilgileri[0] + "t" + satirdakiHastaBilgileri[1] + "t" + satirdakiHastaBilgileri[2] + "t" + satirdakiHastaBilgileri[3] + "t" + satirdakiHastaBilgileri[4] + "t" + satirdakiHastaBilgileri[5]);
}

Console.ReadLine();

}
else if (secim == 3)
{
Console.WriteLine("Aranan Hastaya ait TcKimlik Noyu Giriniz");
atc = Console.ReadLine();
Console.WriteLine("************");
Console.WriteLine("TC KİMLİKtADItSOYADItYAŞtTELEFONtCİNSİYET");
string[] satirlar = File.ReadAllLines("Hasta.txt");
for (int i = 0; i < satirlar.Length; i++)
{
string[] satirdakiHastaBilgileri = satirlar[i].Split(';');
if (satirdakiHastaBilgileri[0] == atc)
{
Console.Write(satirdakiHastaBilgileri[0] + "t" + satirdakiHastaBilgileri[1] + "t" + satirdakiHastaBilgileri[2] + "t" + satirdakiHastaBilgileri[3] + "t" + satirdakiHastaBilgileri[4] + "t" + satirdakiHastaBilgileri[5]);
}

}

Console.ReadLine();
}
else
{
Environment.Exit(0);

}















}
}
}
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.