NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io


private void Form1_Load(object sender, EventArgs e)
{
MasaManager masaManager = new MasaManager();
var masalar = masaManager.MasalariListele();
int tindex = 0;
foreach (var masa in masalar)
{
Button MasaButton = new Button();

MasaButton.Name = "MasaButton" + masa.Id;
MasaButton.Size = new System.Drawing.Size(100, 75);
MasaButton.TabIndex = tindex;
MasaButton.Text = masa.Ad;
MasaButton.BackColor = masa.Dolu ? Color.PaleVioletRed : Color.LightGreen;
// MasaButton.Click += new System.EventHandler(MasaButton_Click);
masaPanel.Controls.Add(MasaButton);
tindex++;
}
}
}
}
22222
public class Masa

{
public int Id { get; set; }
public string Ad { get; set; }
public int Siralama { get; set; }
public bool Dolu { get; set; }

}
}
222222
class Personel
{
public int Id { get; set; }
public string AdSoyad { get; set; }
public Yetkiler Yetki { get; set; }
}

public enum Yetkiler:byte
{
Admin=1,
Garson=2,
Mutfak=3,
Kasa=4
}
}
222222
class Siparis
{
public int Id { get; set; }
public DateTime Tarih { get; set; }
public int PersonelId { get; set; }
public int MasaId { get; set; }
public SiparisDurumlar Durum { get; set; }


}

public enum SiparisDurumlar:byte
{

Iptal =0,
Alindi=1,
Hazirlaniyor=2,
Tamamlandi=3,
OdemeYapildi=4
}
}
22222 class SiparisUrun
{
public int Id { get; set; }
public int SiparisId { get; set; }
public int UrunId { get; set; }
public int Miktar { get; set; }
public double Fiyat { get; set; }
}
}
22222
class Urun
{
public int Id { get; set; }
public string Ad { get; set; }
public double Fiyat { get; set; }
public int Stok { get; set; }
public int KategoriId { get; set; }


}
}
222222
class UrunKategori
{
public int Id { get; set; }
public string Ad { get; set; }
public int Siralama { get; set; }
}
}
33333
public class MasaManager
{
public List<Masa> MasalariListele()
{
var masalar = new List<Masa>();
try
{
string constring = "Server=localhost//SQLEXPRESS01;Database=master;Trusted_Connection=True;";
using (SqlConnection con = new SqlConnection(constring))
{
using (SqlCommand com = new SqlCommand("SELECT * from Masalar", con))
{
con.Open();
SqlDataReader sql = com.ExecuteReader();
while(sql.Read())
{
masalar.Add(new Masa
{
Id = sql.GetInt32(0),
Ad = sql.GetString(1),
Siralama = sql.GetInt32(2),
Dolu = sql.GetBoolean(3)

});
}



}
}

}
catch (Exception e)
{
var a = e;
}
return masalar;
}
}
}
33333
namespace RestoranProjesi.Servis
{
class SiparisManager
{


}
}


     
 
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.