Ejemplo n.º 1
0
        private void pictureBox2_Click(object sender, EventArgs e)
        {
            Restourant yeni = new Restourant();

            yeni.Show();
            this.Hide();
        }
Ejemplo n.º 2
0
        private void restoranToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Restourant reestoran = new Restourant();

            this.Hide();
            reestoran.Show();
        }
        public ActionResult DeleteConfirmed(int id)
        {
            Restourant restourant = db.Restourants.Find(id);

            db.Restourants.Remove(restourant);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Ejemplo n.º 4
0
        private void restoranToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //Menustripten restoran seçeneği seçilirse o sayfaya geçiş yapar.
            Restourant reestoran = new Restourant();

            this.Hide();
            reestoran.Show();
        }
 public ActionResult Edit([Bind(Include = "Id,Name,City,Country")] Restourant restourant)
 {
     if (ModelState.IsValid)
     {
         db.Entry(restourant).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(restourant));
 }
        public ActionResult Create([Bind(Include = "Id,Name,City,Country")] Restourant restourant)
        {
            if (ModelState.IsValid)
            {
                db.Restourants.Add(restourant);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(restourant));
        }
        // GET: Restourants/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Restourant restourant = db.Restourants.Find(id);

            if (restourant == null)
            {
                return(HttpNotFound());
            }
            return(View(restourant));
        }
Ejemplo n.º 8
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (BaseClass.kategori == "Muze")
            {
                this.Hide();
                Museum muze = new Museum();
                muze.Show();
            }

            if (BaseClass.kategori == "Tur")
            {
                this.Hide();
                Tour tur = new Tour();
                tur.Show();
            }

            if (BaseClass.kategori == "Otel")
            {
                this.Hide();
                Hotel otel = new Hotel();
                otel.Show();
            }

            if (BaseClass.kategori == "Restoran")
            {
                this.Hide();
                Restourant rest = new Restourant();
                rest.Show();
            }

            if (BaseClass.kategori == "Odeme")
            {
                this.Hide();
                Payment odeme = new Payment();
                odeme.Show();
            }

            if (BaseClass.kategori == "Anasayfa")
            {
                this.Hide();
                HomePage ana = new HomePage();
                ana.Show();
            }
        }
Ejemplo n.º 9
0
        public override void execute(Restourant restourant)
        {
            int tableNumber = int.Parse(Data[0]);

            foreach (var productName in Data.Skip(1))
            {
                Order order;

                try
                {
                    order = new Order(tableNumber, productName);
                    restourant.OrderProduct(order);
                }
                catch (Exception exception)
                {
                    Console.WriteLine(exception.Message);
                }
            }
        }
Ejemplo n.º 10
0
        public override void execute(Restourant restourant)
        {
            string  type        = Data[0];
            string  productName = Data[1];
            int     weight      = int.Parse(Data[2]);
            decimal price       = decimal.Parse(Data[3], CultureInfo.InvariantCulture);

            IProduct product;

            try
            {
                product = ProductFactory.Build(type, productName, price, weight);
                restourant.AddToMenu(product);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
        }
Ejemplo n.º 11
0
 public Engine()
 {
     Restourant = new Restourant();
 }
Ejemplo n.º 12
0
 public abstract void execute(Restourant restourant);