Example #1
0
 private void btnAddTable_Click(object sender, EventArgs e)
 {
     if (txtAddTableCapacity.Text.Length >= 1 && txtAddTableNumber.Text.Length >= 1)
     {
         string status = rdAddTableActive.Checked ? "Active" : "Passive";
         if (isValidNumber(txtAddTableNumber.Text) && isValidNumber(txtAddTableCapacity.Text))
         {
             if (TableStore.ShouldCreateTable(int.Parse(txtAddTableNumber.Text)))
             {
                 TableStore.CreateNewTable(new Table(int.Parse(txtAddTableNumber.Text), int.Parse(txtAddTableCapacity.Text), status));
                 MessageBox.Show("Tavolina u regjistrua me sukses");
                 txtAddTableCapacity.Clear();
                 txtAddTableNumber.Clear();
             }
             else
             {
                 MessageBox.Show("TAvolina me kete Id ekziston");
             }
         }
         else
         {
             MessageBox.Show("Ju lutem shkruani fushtat ne formatin e duhur : Numer");
         }
     }
     else
     {
         MessageBox.Show("ju lutem mbushni te gjitha fushat");
     }
 }
Example #2
0
        static void Main()
        {
            Category obj  = new Category(1, "Skare", "Food");
            Category pije = new Category(10, "Pije", "Drink");

            Category.AddNewCategory(obj);
            Category.AddNewCategory(pije);

            Food  ob = new Food("hell", obj, "adssads", 3, "sadsa", "asdsad");
            Drink dr = new Drink("CocaCola", obj, "sdadsa", 2, "sadasdsa");

            MenuStore.CreateNewMenuItem(new Food("Mish i Bardhe", obj, "Perskrimi i mishit", (decimal)2.50, "Receta"));
            MenuStore.CreateNewMenuItem(new Food("Qebapa 5she", obj, "Perskrimi i mishit", (decimal)1.50, "Receta"));
            MenuStore.CreateNewMenuItem(new Food("Pleskavice ne pjate", obj, "Perskrimi i mishit", (decimal)3.50, "Receta"));
            MenuStore.CreateNewMenuItem(dr);
            MenuStore.CreateNewMenuItem(new Drink("Kafe Makiato", pije, "dadsadsa", 1, "dsad"));
            TableStore.CreateNewTable(new Table(1, 4, "Altiv"));
            TableStore.CreateNewTable(new Table(2, 4, "Altiv"));
            TableStore.CreateNewTable(new Table(3, 4, "Altiv"));

            TableStore.CreateNewTable(new Table(4, 4, "Altiv"));
            Category.AddNewCategory(new Category(20, "Supa", "Food"));
            Category.AddNewCategory(new Category(30, "Pizza", "Food"));


            Category.AddNewCategory(new Category(40, "Caj", "Drink"));
            Category.AddNewCategory(new Category(50, "Kafe", "Drink"));


            EmployesStore.AddNewEmployee(new Employee("Donald", "Isufi", "admin", "123456", "Zenel Bajraktari"));
            EmployesStore.AddNewEmployee(new Employee("Altin", "Gashi", "admin2", "123456", "Ismet munishi"));

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Login());
        }