C# işçi listesi

BitL1Grkn

Yeni üye
8 Şub 2011
3
0
bir işçi listesi hazırlamam gerekiyor. işçi ekle ,işçi çıkar, işçi arama, işçi düzenle v.b bu komu hakkında yardım edebilecek var mı ?

ben programı biraz yazdım fakat devamını getiremedim
bu programda bana case 3 ,case 5 ve case 6 yı yapamadım bunlar hakkında bilgisi olan lütfen yardım etsin



[FONT=&quot]using[/FONT][FONT=&quot] System;[/FONT]
[FONT=&quot]using[/FONT][FONT=&quot] System.Collections.Generic;[/FONT]
[FONT=&quot]using[/FONT][FONT=&quot] System.Text;[/FONT]
[FONT=&quot]using[/FONT][FONT=&quot] System.IO;[/FONT]

[FONT=&quot]namespace[/FONT][FONT=&quot] ConsoleApplication1[/FONT]
[FONT=&quot]{[/FONT]
[FONT=&quot] class Program[/FONT]
[FONT=&quot] {[/FONT]
[FONT=&quot] static voıd Main(string[] args)[/FONT]
[FONT=&quot] {[/FONT]
[FONT=&quot] string ad;[/FONT]
[FONT=&quot] string soyad;[/FONT]
[FONT=&quot] string adsoyad;[/FONT]
[FONT=&quot] string doğumtarihi;[/FONT]
[FONT=&quot] string kayitlar;[/FONT]
[FONT=&quot] char secim = '1';[/FONT]
[FONT=&quot] char eh;[/FONT]
[FONT=&quot] while (secim != '7')[/FONT]
[FONT=&quot] {[/FONT]
[FONT=&quot] Console.Clear();[/FONT]
[FONT=&quot] Console.WriteLine(" HOŞ GELDİNİZ ");[/FONT]
[FONT=&quot] Console.WriteLine("--------------------------------------------------------------------------------");[/FONT]
[FONT=&quot] Console.WriteLine("--------------------------------------------------------------------------------");[/FONT]
[FONT=&quot] Console.WriteLine(" 1.İŞÇİ KAYIT ");[/FONT]
[FONT=&quot] Console.WriteLine(" 2.İŞÇİ LİSTESİ ");[/FONT]
[FONT=&quot] Console.WriteLine(" 3.İŞÇİ ARA ");[/FONT]
[FONT=&quot] Console.WriteLine(" 4.VERİ TABANINI SIFIRLA ");[/FONT]
[FONT=&quot] Console.WriteLine(" 5.İŞÇİ SİL ");[/FONT]
[FONT=&quot] Console.WriteLine(" 6.İŞÇİ DÜZENLE");[/FONT]
[FONT=&quot] Console.WriteLine(" 7.ÇIKIŞ ");[/FONT]
[FONT=&quot] secim = Convert.ToChar(Console.ReadLine());[/FONT]
[FONT=&quot] switch (secim)[/FONT]
[FONT=&quot] {[/FONT]
[FONT=&quot] case '1':[/FONT]
[FONT=&quot] FileStream dosya = new FileStream("veritabani.txt", FileMode.Append, FileAccess.Write);[/FONT]
[FONT=&quot] Console.Clear();[/FONT]
[FONT=&quot] Console.WriteLine("Ismi giriniz:");[/FONT]
[FONT=&quot] ad = Console.ReadLine();[/FONT]
[FONT=&quot] Console.WriteLine("Soyismi giriniz:");[/FONT]
[FONT=&quot] soyad = Console.ReadLine();[/FONT]
[FONT=&quot] Console.WriteLine("Doğum tarihinizi giriniz:");[/FONT]
[FONT=&quot] doğumtarihi = Console.ReadLine();[/FONT]
[FONT=&quot] adsoyad = ad + " " + soyad + " " + doğumtarihi;[/FONT]
[FONT=&quot] StreamWriter yaz = new StreamWriter(dosya);[/FONT]
[FONT=&quot] yaz.WriteLine(adsoyad);[/FONT]
[FONT=&quot] Console.WriteLine("Bilgileriniz basariyla kaydedildi: " + adsoyad);[/FONT]
[FONT=&quot] yaz.Close();[/FONT]
[FONT=&quot] dosya.Close();[/FONT]
[FONT=&quot] Console.WriteLine("Devam etmek icin bir tusa basiniz...");[/FONT]
[FONT=&quot] Console.ReadKey();[/FONT]
[FONT=&quot] break;[/FONT]
[FONT=&quot] case '2':[/FONT]
[FONT=&quot] FileStream file = new FileStream("veritabani.txt", FileMode.Open, FileAccess.Read);[/FONT]
[FONT=&quot] Console.Clear();[/FONT]
[FONT=&quot] Console.WriteLine("Kayitlar...");[/FONT]
[FONT=&quot] StreamReader oku = new StreamReader(file);[/FONT]
[FONT=&quot] kayitlar = oku.ReadToEnd();[/FONT]
[FONT=&quot] Console.WriteLine("Isim Soyad Numara");[/FONT]
[FONT=&quot] Console.WriteLine("----- ------ -------");[/FONT]
[FONT=&quot] Console.WriteLine(kayitlar);[/FONT]
[FONT=&quot] Console.WriteLine("Devam etmek icin bir tusa basiniz...");[/FONT]
[FONT=&quot] Console.ReadKey();[/FONT]
[FONT=&quot] oku.Close();[/FONT]
[FONT=&quot] file.Close();[/FONT]
[FONT=&quot] break;[/FONT]
[FONT=&quot] case '3':[/FONT]
[FONT=&quot] Console.Clear();[/FONT]
[FONT=&quot] Console.WriteLine("Bu bolum yapim asamasindadir");[/FONT]
[FONT=&quot] Console.WriteLine("Devam etmek icin bir tusa basiniz...");[/FONT]
[FONT=&quot] Console.ReadKey();[/FONT]
[FONT=&quot] break;[/FONT]
[FONT=&quot] case '4':[/FONT]
[FONT=&quot] Console.Clear();[/FONT]
[FONT=&quot] Console.WriteLine("Butun bilgiler gidecek, emin misiniz?(e/h)");[/FONT]
[FONT=&quot] eh = Convert.ToChar(Console.ReadLine());[/FONT]
[FONT=&quot] if (eh == 'e')[/FONT]
[FONT=&quot] {[/FONT]
[FONT=&quot] FileStream bosalt = new FileStream("veritabani.txt", FileMode.Create, FileAccess.Write);[/FONT]
[FONT=&quot] StreamWriter bosyaz = new StreamWriter(bosalt);[/FONT]
[FONT=&quot] bosyaz.WriteLine(" ");[/FONT]
[FONT=&quot] bosalt.Close();[/FONT]
[FONT=&quot] Console.WriteLine("Verileriniz basariyla sifirlandi, devam etmek icin bir tusa basiniz...");[/FONT]
[FONT=&quot] Console.ReadKey();[/FONT]
[FONT=&quot] }[/FONT]
[FONT=&quot] else[/FONT]
[FONT=&quot] {[/FONT]
[FONT=&quot] Console.WriteLine("Verilerinizi sifirlamadiniz");[/FONT]
[FONT=&quot] Console.WriteLine("Devam etmek icin bir tusa basiniz...");[/FONT]
[FONT=&quot] Console.ReadKey();[/FONT]

[FONT=&quot] }[/FONT]

[FONT=&quot] break;[/FONT]
 
Son düzenleme:

BackBox

Katılımcı Üye
3 Tem 2007
940
2
Kartepe
case 3 benden...


Console.Clear();
StreamReader inputstream = new StreamReader("veritabani.txt");
string line = "";
Console.Write("Adı : ");
string name = Console.ReadLine();
Console.Write("Soyadı : ");
string surname = Console.ReadLine();
name=name.ToUpper();
surname=surname.ToUpper();
do
{
line = inputstream.ReadLine();
char[] c = {' '};
try
{
string[] infos = line.Split(c);
//infos[0]=infos[0].ToUpper();
//infos[1]=infos[1].ToUpper();
for (int i = 0; i < infos.Length; i++)
{
infos=infos.ToUpper();
}
string[] infos1 = line.Split(c);
if ((infos[0] == name) && (infos[1] == surname))
{
Console.Clear();
Console.WriteLine("Adı : {0}\nSoyadı : {1}\nDoğum Tarihi : {2}"
, infos1[0], infos1[1], infos1[2]);
break;
}
}
catch (Exception)
{
Console.WriteLine("Veri Bulunamadı!...");
break;
}
} while (line != "");
//Console.WriteLine("Bu bolum yapim asamasindadir");
Console.WriteLine("Devam etmek icin bir tusa basiniz...");
Console.ReadKey();
 

_EtOo_

Üye
27 Ocak 2011
52
0
yazdığın kodların program görüntüsü olarakta nasıl göründüğünü gösterirsen resimle geliştirmede fikir verebiliriim
 

BackBox

Katılımcı Üye
3 Tem 2007
940
2
Kartepe
hocam console programı ekran görüntüsü hep aynı siyah ekran program görüntüsünü ne yapacaksın...:}
 

BackBox

Katılımcı Üye
3 Tem 2007
940
2
Kartepe
case 5 için kafada iki argoritma oluşturdum...
şimdi internet cafedeyim unutmazsam evde halletmeye çalışırım...
 
Üst

Turkhackteam.org internet sitesi 5651 sayılı kanun’un 2. maddesinin 1. fıkrasının m) bendi ile aynı kanunun 5. maddesi kapsamında "Yer Sağlayıcı" konumundadır. İçerikler ön onay olmaksızın tamamen kullanıcılar tarafından oluşturulmaktadır. Turkhackteam.org; Yer sağlayıcı olarak, kullanıcılar tarafından oluşturulan içeriği ya da hukuka aykırı paylaşımı kontrol etmekle ya da araştırmakla yükümlü değildir. Türkhackteam saldırı timleri Türk sitelerine hiçbir zararlı faaliyette bulunmaz. Türkhackteam üyelerinin yaptığı bireysel hack faaliyetlerinden Türkhackteam sorumlu değildir. Sitelerinize Türkhackteam ismi kullanılarak hack faaliyetinde bulunulursa, site-sunucu erişim loglarından bu faaliyeti gerçekleştiren ip adresini tespit edip diğer kanıtlarla birlikte savcılığa suç duyurusunda bulununuz.