NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

double Bakiye = 0;
int Barkod = 100;

string[,] Kategoriler = {
{"021","MANAV" },
{ "312","BAKLİYAT"},
{ "659","KIRTASİYE"},
{"655","GİYİM" },
{ "695","KASAP & ŞARKÜTERİ"}
};
string[,] Raporlar = new string[1, 3];
string[,] Urunler = {
{ "001","Nohut","KG","150","2,00","3,00","312"},
{ "002","Fasülye","KG","100","1,00","2,00","021"},
{ "003","Kalem","ADET","500","0,25","1,00","021"}

};


for (;;)
{
Console.WriteLine("1_ Kasa");
Console.WriteLine("2_ Ürün Alımı");
Console.WriteLine("3_ Satış");
Console.WriteLine("4_ Raporlar");
Console.WriteLine("5_ Çıkış");
Console.WriteLine();
Console.Write("Lütfen bir seçim yapın: ");

string Secim = Console.ReadLine();

if (Secim == "1")
{
Console.WriteLine("Bakiye: " + Bakiye);
Console.WriteLine("Ana menüye dönmek için bir tuşa basın.");
Console.ReadKey();
Console.Clear();
continue;
}
else if (Secim == "2")
{
Console.Clear();
Console.WriteLine("*** KATEGORİLER ***");
for (int i = 0; i < Kategoriler.GetLength(0); i++)
{
for (int j = 0; j < Kategoriler.GetLength(1); j++)
{
Console.Write(Kategoriler[i, j] + " ");
}
Console.WriteLine();
}
Console.WriteLine();

Console.Write("Ürün Adı: ");
string urunAdi = Console.ReadLine();
Console.Write("Birim: ");
string birim = Console.ReadLine();
Console.Write("Adet: ");
string adet = Console.ReadLine();
Console.Write("Alış Fiyatı: ");
string alisFiyati = Console.ReadLine();
Console.Write("Satış Fiyatı: ");
string satisFiyati = Console.ReadLine();
Console.Write("Kategori No: ");
string kategoriKodu = Console.ReadLine();


string[,] UrunlerYedek = new string[Urunler.GetLength(0), Urunler.GetLength(1)];
for (int i = 0; i < Urunler.GetLength(0); i++)
{
for (int j = 0; j < Urunler.GetLength(1); j++)
{
UrunlerYedek[i, j] = Urunler[i, j];
}
}

int boyut = Urunler.GetLength(0) + 1;

Urunler = new string[boyut, UrunlerYedek.GetLength(1)];
for (int i = 0; i < UrunlerYedek.GetLength(0); i++)
{
for (int j = 0; j < UrunlerYedek.GetLength(1); j++)
{
Urunler[i, j] = UrunlerYedek[i, j];
}
}

int index = Urunler.GetLength(0) - 1;
Urunler[index, 0] = Barkod.ToString();
Urunler[index, 1] = urunAdi;
Urunler[index, 2] = birim;
Urunler[index, 3] = adet;
Urunler[index, 4] = alisFiyati;
Urunler[index, 5] = satisFiyati;
Urunler[index, 6] = kategoriKodu;

Barkod++;

double Fiyat = Convert.ToDouble(alisFiyati);
double Miktar = Convert.ToDouble(adet);

Bakiye -= Fiyat * Miktar;


if (Raporlar.GetLength(0) == 1)
{
Raporlar[0, 0] = "Ürün Alımı";
Raporlar[0, 1] = (Fiyat * Miktar).ToString();
Raporlar[0, 2] = DateTime.Now.ToString();
}
else
{
string[,] RaporlarYedek = new string[Raporlar.GetLength(0), Raporlar.GetLength(1)];
for (int i = 0; i < Raporlar.GetLength(0); i++)
{
for (int j = 0; j < Raporlar.GetLength(1); j++)
{
RaporlarYedek[i, j] = Raporlar[i, j];
}
}

int RaporlarBoyut = Raporlar.GetLength(0) + 1;

Raporlar = new string[RaporlarBoyut, RaporlarYedek.GetLength(1)];
for (int i = 0; i < RaporlarYedek.GetLength(0); i++)
{
for (int j = 0; j < RaporlarYedek.GetLength(1); j++)
{
Raporlar[i, j] = RaporlarYedek[i, j];
}
}

int RaporIndex = Raporlar.GetLength(0) - 1;
Raporlar[RaporIndex, 0] = "Ürün Alımı";
Raporlar[RaporIndex, 1] = (Fiyat * Miktar).ToString();
Raporlar[RaporIndex, 2] = DateTime.Now.ToString();
}

Console.WriteLine("İşlem başarıyla gerçekleşti. Ana menüye dönmek için bir tuşa basın.");
Console.ReadKey();
Console.Clear();

}
else if (Secim == "3")
{
Console.Clear();

Console.WriteLine("*** KATEGORİLER ***");
Console.WriteLine("Kodut Kategori");
for (int i = 0; i < Kategoriler.GetLength(0); i++)
{
for (int j = 0; j < Kategoriler.GetLength(1); j++)
{
Console.Write(Kategoriler[i, j] + "t");
}
Console.WriteLine();
}
Console.WriteLine();

Console.WriteLine("*** ÜRÜNLER ***");
Console.WriteLine("BarkodtAdıtBirimtAdettAlımtSatıştKategori");
for (int i = 0; i < Urunler.GetLength(0); i++)
{
for (int j = 0; j < Urunler.GetLength(1); j++)
{
Console.Write(Urunler[i, j] + "t");
}
Console.WriteLine();
}

Console.WriteLine();

Console.Write("Satışını yapmak istediğiniz ürünün barkodunu girin: ");
string GirilenBarkod = Console.ReadLine();
bool UrunBulunduMu = false;
int IndexNo = -1;

for (int i = 0; i < Urunler.GetLength(0); i++)
{
if (Urunler[i, 0] == GirilenBarkod)
{
UrunBulunduMu = true;
IndexNo = i;
}
}

if (UrunBulunduMu == true)
{
Console.Write("Adet giriniz: ");
double GirilenAdet = Convert.ToDouble(Console.ReadLine());

double Stok = Convert.ToDouble(Urunler[IndexNo, 3]);
double SatisFiyati = Convert.ToDouble(Urunler[IndexNo, 5]);

if (GirilenAdet <= Stok)
{
Bakiye += SatisFiyati * GirilenAdet;

Stok -= GirilenAdet;
Urunler[IndexNo, 3] = Stok.ToString();

Console.WriteLine("nİşlem Tutarı: " + (SatisFiyati * GirilenAdet));

if (Raporlar.GetLength(0) == 1)
{
Raporlar[0, 0] = "Ürün Satışı";
Raporlar[0, 1] = (SatisFiyati * GirilenAdet).ToString();
Raporlar[0, 2] = DateTime.Now.ToString();
}
else
{
string[,] RaporlarYedek = new string[Raporlar.GetLength(0), Raporlar.GetLength(1)];
for (int i = 0; i < Raporlar.GetLength(0); i++)
{
for (int j = 0; j < Raporlar.GetLength(1); j++)
{
RaporlarYedek[i, j] = Raporlar[i, j];
}
}

int RaporlarBoyut = Raporlar.GetLength(0) + 1;

Raporlar = new string[RaporlarBoyut, RaporlarYedek.GetLength(1)];
for (int i = 0; i < RaporlarYedek.GetLength(0); i++)
{
for (int j = 0; j < RaporlarYedek.GetLength(1); j++)
{
Raporlar[i, j] = RaporlarYedek[i, j];
}
}

int RaporIndex = Raporlar.GetLength(0) - 1;
Raporlar[RaporIndex, 0] = "Ürün Satışı";
Raporlar[RaporIndex, 1] = (SatisFiyati * GirilenAdet).ToString();
Raporlar[RaporIndex, 2] = DateTime.Now.ToString();
}


Console.WriteLine("İşlem başarıyla gerçekleşti. Ana menüye dönmek için bir tuşa basın...");

}
else
{
Console.WriteLine("Az iste nabıyosun!11!!!");
}

}
else
Console.WriteLine("Ürün Bulunamadı. Lütfen tekrar deneyin! ");

Console.ReadKey();
Console.Clear();
}
else if (Secim == "4")
{
Console.Clear();
Console.WriteLine("İşlem Tipitİşlem Miktarıtİşlem Tarihi");
for (int i = 0; i < Raporlar.GetLength(0); i++)
{
for (int j = 0; j < Raporlar.GetLength(1); j++)
{
Console.Write(Raporlar[i,j]+"t");
}
Console.WriteLine();
}

Console.WriteLine("Ana menüye dönmek için bir tuşa basın.");
Console.ReadKey();

}
else if (Secim == "5")
{
Console.Clear();
Console.WriteLine("Bizi tercih ettiğiniz için teşekkürler. İyi günler!");
Console.ReadKey();
Environment.Exit(0);
}
else
{
Console.WriteLine("Lütfen geçerli bir seçim yapınız!");
Console.ReadKey();
Console.Clear();
continue;
}

}
     
 
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.